build.gradle 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import java.time.Instant
  2. plugins {
  3. id 'java'
  4. id 'application'
  5. }
  6. group projectGroup
  7. version projectVersion
  8. application {
  9. mainClass = 'cz.senslog.telemetry.app.Main'
  10. }
  11. repositories {
  12. mavenLocal()
  13. mavenCentral()
  14. }
  15. java {
  16. sourceCompatibility = JavaVersion.VERSION_17
  17. targetCompatibility = JavaVersion.VERSION_17
  18. }
  19. build {
  20. doLast {
  21. ant.propertyfile(file: "gradle.properties") {
  22. entry( key: "buildVersion", value: Instant.now().getEpochSecond())
  23. }
  24. }
  25. }
  26. jar {
  27. duplicatesStrategy = DuplicatesStrategy.EXCLUDE
  28. manifest {
  29. attributes 'Implementation-Title': 'SensLog Telemetry',
  30. 'Implementation-Version': version,
  31. 'Main-Class': 'cz.senslog.telemetry.app.Main'
  32. }
  33. from {
  34. configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
  35. }
  36. }
  37. jar.archiveFileName = "telemetry.jar"
  38. test {
  39. useJUnitPlatform()
  40. }
  41. dependencies {
  42. implementation 'org.apache.logging.log4j:log4j-api:2.22.0'
  43. implementation 'org.apache.logging.log4j:log4j-core:2.22.0'
  44. implementation 'io.vertx:vertx-core:4.4.0'
  45. implementation 'io.vertx:vertx-web:4.4.0'
  46. implementation 'io.vertx:vertx-web-openapi:4.4.0'
  47. implementation 'io.vertx:vertx-pg-client:4.4.0'
  48. implementation 'org.postgresql:postgresql:42.6.0'
  49. implementation 'com.ongres.scram:client:2.1'
  50. testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
  51. testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
  52. testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.1.5'
  53. testImplementation 'org.mockito:mockito-core:5.3.1'
  54. testImplementation 'io.vertx:vertx-junit5:4.4.0'
  55. testImplementation 'org.assertj:assertj-core:3.24.2'
  56. testImplementation 'org.openapi4j:openapi-parser:1.0.7'
  57. testImplementation 'org.openapi4j:openapi-schema-validator:1.0.7'
  58. }