build.gradle.kts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("org.apache.shenyu")
  7. module.set("shenyu-web")
  8. versions.set("[2.4.0,)")
  9. assertInverse.set(true)
  10. }
  11. }
  12. dependencies {
  13. compileOnly("org.apache.shenyu:shenyu-web:2.4.0")
  14. compileOnly("com.google.auto.value:auto-value-annotations")
  15. annotationProcessor("com.google.auto.value:auto-value")
  16. testLibrary("org.springframework.boot:spring-boot-starter-test:2.0.0.RELEASE")
  17. // based on apache shenyu 2.4.0 official example
  18. testLibrary("org.apache.shenyu:shenyu-spring-boot-starter-gateway:2.4.0") {
  19. exclude("org.codehaus.groovy", "groovy")
  20. }
  21. testImplementation("org.springframework.boot:spring-boot-starter-webflux:2.2.2.RELEASE") {
  22. exclude("org.codehaus.groovy", "groovy")
  23. }
  24. // the latest version of apache shenyu uses spring-boot 2.7
  25. latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.7.+")
  26. testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
  27. }
  28. tasks.withType<Test>().configureEach {
  29. jvmArgs("-Dotel.instrumentation.apache-shenyu.experimental-span-attributes=true")
  30. // required on jdk17
  31. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  32. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  33. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  34. }
  35. configurations.testRuntimeClasspath {
  36. resolutionStrategy {
  37. // requires old logback (and therefore also old slf4j)
  38. force("ch.qos.logback:logback-classic:1.2.11")
  39. force("org.slf4j:slf4j-api:1.7.36")
  40. }
  41. }