build.gradle.kts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. id("otel.scala-conventions")
  4. }
  5. muzzle {
  6. pass {
  7. group.set("org.apache.pekko")
  8. module.set("pekko-http_2.12")
  9. versions.set("[1.0,)")
  10. assertInverse.set(true)
  11. extraDependency("org.apache.pekko:pekko-stream_2.12:1.0.1")
  12. }
  13. pass {
  14. group.set("org.apache.pekko")
  15. module.set("pekko-http_2.13")
  16. versions.set("[1.0,)")
  17. assertInverse.set(true)
  18. extraDependency("org.apache.pekko:pekko-stream_2.13:1.0.1")
  19. }
  20. }
  21. dependencies {
  22. library("org.apache.pekko:pekko-http_2.12:1.0.0")
  23. library("org.apache.pekko:pekko-stream_2.12:1.0.1")
  24. testInstrumentation(project(":instrumentation:pekko-actor-1.0:javaagent"))
  25. testInstrumentation(project(":instrumentation:executors:javaagent"))
  26. latestDepTestLibrary("org.apache.pekko:pekko-http_2.13:+")
  27. latestDepTestLibrary("org.apache.pekko:pekko-stream_2.13:+")
  28. }
  29. tasks {
  30. val testStableSemconv by registering(Test::class) {
  31. jvmArgs("-Dotel.semconv-stability.opt-in=http")
  32. }
  33. withType<Test>().configureEach {
  34. // required on jdk17
  35. jvmArgs("--add-exports=java.base/sun.security.util=ALL-UNNAMED")
  36. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  37. jvmArgs("-Dio.opentelemetry.javaagent.shaded.io.opentelemetry.context.enableStrictContext=false")
  38. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  39. }
  40. check {
  41. dependsOn(testStableSemconv)
  42. }
  43. }
  44. if (findProperty("testLatestDeps") as Boolean) {
  45. configurations {
  46. // pekko artifact name is different for regular and latest tests
  47. testImplementation {
  48. exclude("org.apache.pekko", "pekko-http_2.12")
  49. exclude("org.apache.pekko", "pekko-stream_2.12")
  50. }
  51. }
  52. }