build.gradle.kts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  2. plugins {
  3. id("org.jetbrains.kotlin.jvm")
  4. id("otel.javaagent-instrumentation")
  5. }
  6. muzzle {
  7. pass {
  8. group.set("org.jetbrains.kotlinx")
  9. module.set("kotlinx-coroutines-core")
  10. versions.set("[1.0.0,1.3.8)")
  11. extraDependency(project(":instrumentation-annotations"))
  12. extraDependency("io.opentelemetry:opentelemetry-api:1.27.0")
  13. }
  14. // 1.3.9 (and beyond?) have changed how artifact names are resolved due to multiplatform variants
  15. pass {
  16. group.set("org.jetbrains.kotlinx")
  17. module.set("kotlinx-coroutines-core-jvm")
  18. versions.set("[1.3.9,)")
  19. extraDependency(project(":instrumentation-annotations"))
  20. extraDependency("io.opentelemetry:opentelemetry-api:1.27.0")
  21. }
  22. }
  23. dependencies {
  24. compileOnly("io.opentelemetry:opentelemetry-extension-kotlin")
  25. compileOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  26. compileOnly(project(":opentelemetry-instrumentation-annotations-shaded-for-instrumenting", configuration = "shadow"))
  27. implementation("org.ow2.asm:asm-tree")
  28. implementation("org.ow2.asm:asm-util")
  29. implementation(project(":instrumentation:opentelemetry-instrumentation-annotations-1.16:javaagent"))
  30. testInstrumentation(project(":instrumentation:opentelemetry-extension-kotlin-1.0:javaagent"))
  31. testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))
  32. testImplementation("io.opentelemetry:opentelemetry-extension-kotlin")
  33. testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  34. testImplementation(project(":instrumentation:reactor:reactor-3.1:library"))
  35. testImplementation(project(":instrumentation-annotations"))
  36. // Use first version with flow support since we have tests for it.
  37. testLibrary("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0")
  38. testLibrary("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:1.3.0")
  39. }
  40. tasks {
  41. withType(KotlinCompile::class).configureEach {
  42. kotlinOptions {
  43. jvmTarget = "1.8"
  44. // generate metadata for Java 1.8 reflection on method parameters, used in @WithSpan tests
  45. javaParameters = true
  46. }
  47. }
  48. }