build.gradle.kts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. plugins {
  2. id("org.jetbrains.kotlin.jvm")
  3. id("otel.javaagent-instrumentation")
  4. }
  5. muzzle {
  6. pass {
  7. group.set("org.jetbrains.kotlinx")
  8. module.set("kotlinx-coroutines-core")
  9. versions.set("[1.0.0,1.3.8)")
  10. }
  11. // 1.3.9 (and beyond?) have changed how artifact names are resolved due to multiplatform variants
  12. pass {
  13. group.set("org.jetbrains.kotlinx")
  14. module.set("kotlinx-coroutines-core-jvm")
  15. versions.set("[1.3.9,)")
  16. }
  17. }
  18. dependencies {
  19. compileOnly("io.opentelemetry:opentelemetry-extension-kotlin")
  20. compileOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  21. testImplementation("io.opentelemetry:opentelemetry-extension-kotlin")
  22. testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  23. // Use first version with flow support since we have tests for it.
  24. testLibrary("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0")
  25. }
  26. tasks {
  27. val compileTestKotlin by existing(AbstractCompile::class)
  28. named<GroovyCompile>("compileTestGroovy") {
  29. // Note: look like it should be `classpath += files(sourceSets.test.kotlin.classesDirectory)`
  30. // instead, but kotlin plugin doesn't support it (yet?)
  31. classpath = classpath.plus(files(compileTestKotlin.get().destinationDir))
  32. }
  33. }
  34. tasks.withType<Test>().configureEach {
  35. jvmArgs("-Dio.opentelemetry.javaagent.shaded.io.opentelemetry.context.enableStrictContext=false")
  36. }