build.gradle.kts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. plugins {
  2. id("org.jetbrains.kotlin.jvm")
  3. id("otel.javaagent-instrumentation")
  4. }
  5. muzzle {
  6. pass {
  7. group.set("io.opentelemetry")
  8. module.set("opentelemetry-extension-kotlin")
  9. versions.set("[0.17.0,)")
  10. assertInverse.set(true)
  11. skip("0.13.0") // has a bad dependency on non-alpha api-metric 0.13.0
  12. extraDependency("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0")
  13. }
  14. }
  15. dependencies {
  16. compileOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  17. library("io.opentelemetry:opentelemetry-extension-kotlin")
  18. // see the comment in opentelemetry-api-1.0.gradle for more details
  19. compileOnly(project(":opentelemetry-api-shaded-for-instrumenting", configuration = "shadow"))
  20. implementation(project(":instrumentation:opentelemetry-api:opentelemetry-api-1.0:javaagent"))
  21. testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  22. testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0")
  23. }
  24. if (!(findProperty("testLatestDeps") as Boolean)) {
  25. // run tests against an early version of opentelemetry-extension-kotlin, latest dep tests will use
  26. // the current version
  27. configurations.configureEach {
  28. if (!name.contains("muzzle")) {
  29. resolutionStrategy {
  30. eachDependency {
  31. if (requested.group == "io.opentelemetry" && requested.name == "opentelemetry-extension-kotlin") {
  32. useVersion("1.0.0")
  33. }
  34. }
  35. }
  36. }
  37. }
  38. }
  39. tasks {
  40. withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class).configureEach {
  41. kotlinOptions {
  42. jvmTarget = "1.8"
  43. }
  44. }
  45. }