build.gradle.kts 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. plugins {
  2. id("otel.java-conventions")
  3. id("org.springframework.boot") version "3.2.5"
  4. id("org.graalvm.buildtools.native")
  5. }
  6. description = "smoke-tests-otel-starter-spring-boot-reactive-3"
  7. otelJava {
  8. minJavaVersionSupported.set(JavaVersion.VERSION_17)
  9. }
  10. dependencies {
  11. implementation(project(":instrumentation:spring:starters:spring-boot-starter"))
  12. implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
  13. implementation(project(":smoke-tests-otel-starter:spring-boot-reactive-common"))
  14. implementation("org.springframework.boot:spring-boot-starter-webflux")
  15. testImplementation("org.springframework.boot:spring-boot-starter-test")
  16. testImplementation("io.projectreactor:reactor-test")
  17. }
  18. springBoot {
  19. mainClass = "io.opentelemetry.spring.smoketest.OtelReactiveSpringStarterSmokeTestApplication"
  20. }
  21. tasks {
  22. compileAotJava {
  23. with(options) {
  24. compilerArgs.add("-Xlint:-deprecation,-unchecked,none")
  25. // To disable warnings/failure coming from the Java compiler during the Spring AOT processing
  26. // -deprecation,-unchecked and none are required (none is not enough)
  27. }
  28. }
  29. compileAotTestJava {
  30. with(options) {
  31. compilerArgs.add("-Xlint:-deprecation,-unchecked,none")
  32. // To disable warnings/failure coming from the Java compiler during the Spring AOT processing
  33. // -deprecation,-unchecked and none are required (none is not enough)
  34. }
  35. }
  36. checkstyleAot {
  37. isEnabled = false
  38. }
  39. checkstyleAotTest {
  40. isEnabled = false
  41. }
  42. }
  43. // To be able to execute the tests as GraalVM native executables
  44. configurations.configureEach {
  45. exclude("org.apache.groovy", "groovy")
  46. exclude("org.apache.groovy", "groovy-json")
  47. exclude("org.spockframework", "spock-core")
  48. }
  49. graalvmNative {
  50. binaries.all {
  51. // Workaround for https://github.com/junit-team/junit5/issues/3405
  52. buildArgs.add("--initialize-at-build-time=org.junit.platform.launcher.core.LauncherConfig")
  53. buildArgs.add("--initialize-at-build-time=org.junit.jupiter.engine.config.InstantiatingConfigurationParameterConverter")
  54. }
  55. // See https://github.com/graalvm/native-build-tools/issues/572
  56. metadataRepository {
  57. enabled.set(false)
  58. }
  59. tasks.test {
  60. useJUnitPlatform()
  61. setForkEvery(1)
  62. }
  63. }