build.gradle 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. plugins {
  2. id 'java'
  3. id "io.micronaut.application" version "2.0.6"
  4. id "com.fizzed.rocker" version "1.3.0"
  5. }
  6. group 'org.example'
  7. version '1.0-SNAPSHOT'
  8. repositories {
  9. mavenLocal()
  10. mavenCentral()
  11. }
  12. micronaut {
  13. version '3.1.1'
  14. processing {
  15. incremental true
  16. }
  17. }
  18. nativeImage {
  19. args "--initialize-at-build-time=" +
  20. "views," +
  21. "io.vertx.core.logging.LoggerFactory," +
  22. "io.vertx.core.logging.SLF4JLogDelegateFactory," +
  23. "io.vertx.core.logging.SLF4JLogDelegate," +
  24. "io.vertx.pgclient.impl.codec.DataTypeCodec"
  25. }
  26. sourceSets {
  27. main {
  28. rocker {
  29. srcDir('src/main/resources')
  30. }
  31. }
  32. }
  33. rocker {
  34. skip false
  35. // Base directory for generated java sources, actual target is sub directory
  36. // with the name of the source set. The value is passed through project.file().
  37. outputBaseDirectory = "$buildDir/generated/rocker"
  38. // Base directory for the directory where the hot reload feature
  39. // will (re)compile classes to at runtime (and where `rocker-compiler.conf`
  40. // is generated, which is used by RockerRuntime.getInstance().setReloading(true)).
  41. // The actual target is a sub directory with the name of the source set.
  42. // The value is passed through project.file().
  43. classBaseDirectory = "$buildDir/classes"
  44. failOnError true
  45. skipTouch true
  46. // must not be empty when skipTouch is equal to false
  47. touchFile ""
  48. javaVersion '11'
  49. optimize true
  50. }
  51. mainClassName = 'benchmark.Application'
  52. ext {
  53. set('vertxVersion', '4.1.5')
  54. set('micronautVersion', '3.1.1')
  55. set('javaxAnnotationApi', '1.3.2')
  56. set('rockerVersion', '1.3.0')
  57. }
  58. dependencies {
  59. implementation("io.micronaut:micronaut-inject:${micronautVersion}")
  60. implementation("io.micronaut:micronaut-management:${micronautVersion}")
  61. implementation("io.micronaut:micronaut-http-server-netty:${micronautVersion}")
  62. implementation("io.micronaut.rxjava3:micronaut-rxjava3")
  63. implementation("io.micronaut.sql:micronaut-vertx-pg-client")
  64. implementation("io.micronaut.sql:micronaut-jdbc-hikari:4.0.2")
  65. implementation("io.micronaut.views:micronaut-views-rocker")
  66. implementation("com.fizzed:rocker-runtime:${rockerVersion}")
  67. implementation("io.vertx:vertx-core:${vertxVersion}")
  68. implementation("io.vertx:vertx-rx-java2:${vertxVersion}")
  69. implementation("io.vertx:vertx-rx-java3:${vertxVersion}")
  70. implementation("io.vertx:vertx-pg-client:${vertxVersion}")
  71. runtimeOnly("ch.qos.logback:logback-classic")
  72. testImplementation("io.micronaut.test:micronaut-test-junit5")
  73. testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
  74. }
  75. test {
  76. useJUnitPlatform()
  77. }