build.gradle 2.0 KB

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