build.gradle.kts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import net.ltgt.gradle.errorprone.errorprone
  2. plugins {
  3. id("otel.java-conventions")
  4. id("otel.animalsniffer-conventions")
  5. id("otel.jacoco-conventions")
  6. id("otel.japicmp-conventions")
  7. id("otel.publish-conventions")
  8. id("otel.jmh-conventions")
  9. }
  10. group = "io.opentelemetry.instrumentation"
  11. dependencies {
  12. api("io.opentelemetry:opentelemetry-api")
  13. implementation("io.opentelemetry:opentelemetry-api-incubator")
  14. implementation("io.opentelemetry.semconv:opentelemetry-semconv")
  15. compileOnly("com.google.auto.value:auto-value-annotations")
  16. annotationProcessor("com.google.auto.value:auto-value")
  17. testImplementation(project(":testing-common"))
  18. testImplementation("io.opentelemetry:opentelemetry-sdk-testing")
  19. testImplementation("io.opentelemetry:opentelemetry-exporter-common")
  20. testImplementation("org.junit-pioneer:junit-pioneer")
  21. jmhImplementation(project(":instrumentation-api-incubator"))
  22. }
  23. tasks {
  24. named<Checkstyle>("checkstyleMain") {
  25. exclude("**/concurrentlinkedhashmap/**")
  26. }
  27. // TODO this should live in jmh-conventions
  28. named<JavaCompile>("jmhCompileGeneratedClasses") {
  29. options.errorprone {
  30. isEnabled.set(false)
  31. }
  32. }
  33. withType<Test>().configureEach {
  34. // required on jdk17
  35. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  36. jvmArgs("--add-opens=java.base/java.util=ALL-UNNAMED")
  37. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  38. }
  39. }