plugins { id 'application' id 'com.github.johnrengelman.shadow' version '2.0.2' } repositories { jcenter() } version = '1.0-SNAPSHOT' sourceCompatibility = '1.8' mainClassName = 'io.vertx.core.Launcher' def vertxVersion = '3.5.1' def mainVerticleName = 'nu.ltd.fp.se.SmartOSExporter' def watchForChange = 'src/**/*' def doOnChange = './gradlew classes' dependencies { compile "io.vertx:vertx-core:$vertxVersion" compile "io.vertx:vertx-web:$vertxVersion" compile "io.vertx:vertx-config:$vertxVersion" testCompile "junit:junit:4.12" testCompile "io.vertx:vertx-unit:$vertxVersion" } shadowJar { classifier = 'fat' manifest { attributes "Main-Verticle": mainVerticleName } mergeServiceFiles { include 'META-INF/services/io.vertx.core.spi.VerticleFactory' } } run { args = ['run', mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$mainClassName", "--on-redeploy=$doOnChange"] } task wrapper(type: Wrapper) { gradleVersion = '4.5.1' }