build.gradle 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 prometheusClientVersion = '0.3.0'
  13. def mainVerticleName = 'nu.ltd.fp.se.SmartOSExporter'
  14. def watchForChange = 'src/**/*'
  15. def doOnChange = './gradlew classes'
  16. dependencies {
  17. compile "io.vertx:vertx-core:$vertxVersion"
  18. compile "io.vertx:vertx-web:$vertxVersion"
  19. compile "io.vertx:vertx-config:$vertxVersion"
  20. compile "io.prometheus:simpleclient:$prometheusClientVersion"
  21. compile "io.prometheus:simpleclient_common:$prometheusClientVersion"
  22. compile "io.prometheus:simpleclient_hotspot:$prometheusClientVersion"
  23. testCompile "junit:junit:4.12"
  24. testCompile "io.vertx:vertx-unit:$vertxVersion"
  25. }
  26. shadowJar {
  27. classifier = 'fat'
  28. manifest {
  29. attributes "Main-Verticle": mainVerticleName
  30. }
  31. mergeServiceFiles {
  32. include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
  33. }
  34. }
  35. run {
  36. args = ['run', mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$mainClassName", "--on-redeploy=$doOnChange"]
  37. }
  38. task wrapper(type: Wrapper) {
  39. gradleVersion = '4.5.1'
  40. }