build.gradle 998 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. plugins {
  2. id 'application'
  3. id 'com.github.johnrengelman.shadow' version '2.0.2'
  4. }
  5. repositories {
  6. jcenter()
  7. }
  8. version = '1.0-SNAPSHOT'
  9. sourceCompatibility = '1.8'
  10. mainClassName = 'io.vertx.core.Launcher'
  11. def vertxVersion = '3.5.1'
  12. def mainVerticleName = 'nu.ltd.fp.se.SmartOSExporter'
  13. def watchForChange = 'src/**/*'
  14. def doOnChange = './gradlew classes'
  15. dependencies {
  16. compile "io.vertx:vertx-core:$vertxVersion"
  17. compile "io.vertx:vertx-web:$vertxVersion"
  18. compile "io.vertx:vertx-config:$vertxVersion"
  19. testCompile "junit:junit:4.12"
  20. testCompile "io.vertx:vertx-unit:$vertxVersion"
  21. }
  22. shadowJar {
  23. classifier = 'fat'
  24. manifest {
  25. attributes "Main-Verticle": mainVerticleName
  26. }
  27. mergeServiceFiles {
  28. include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
  29. }
  30. }
  31. run {
  32. args = ['run', mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$mainClassName", "--on-redeploy=$doOnChange"]
  33. }
  34. task wrapper(type: Wrapper) {
  35. gradleVersion = '4.5.1'
  36. }