build.gradle 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.messaging.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 Messaging',
  30. 'Implementation-Version': version,
  31. 'Main-Class': 'cz.senslog.messaging.app.Main'
  32. }
  33. from {
  34. configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
  35. }
  36. }
  37. jar.archiveFileName = "messaging.jar"
  38. test {
  39. useJUnitPlatform()
  40. }
  41. dependencies {
  42. implementation 'org.apache.logging.log4j:log4j-api:2.22.1'
  43. implementation 'org.apache.logging.log4j:log4j-core:2.22.1'
  44. implementation group: 'org.yaml', name: 'snakeyaml', version: '2.2'
  45. implementation 'io.vertx:vertx-core:4.5.3'
  46. implementation 'io.vertx:vertx-web:4.5.3'
  47. implementation 'io.vertx:vertx-web-openapi:4.5.3'
  48. implementation 'org.eclipse.angus:angus-mail:2.0.2'
  49. testImplementation platform('org.junit:junit-bom:5.9.1')
  50. testImplementation 'org.junit.jupiter:junit-jupiter'
  51. }