build.gradle.kts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. // We have two independent covariants, so we have to test them independently.
  6. pass {
  7. group.set("org.springframework.data")
  8. module.set("spring-data-commons")
  9. versions.set("[1.8.0.RELEASE,]")
  10. extraDependency("org.springframework:spring-aop:1.2")
  11. assertInverse.set(true)
  12. }
  13. pass {
  14. group.set("org.springframework")
  15. module.set("spring-aop")
  16. versions.set("[1.2,]")
  17. extraDependency("org.springframework.data:spring-data-commons:1.8.0.RELEASE")
  18. assertInverse.set(true)
  19. }
  20. }
  21. // DQH - API changes that impact instrumentation occurred in spring-data-commons in March 2014.
  22. // For now, that limits support to spring-data-commons 1.9.0 (maybe 1.8.0).
  23. // For testing, chose a couple spring-data modules that are old enough to work with 1.9.0.
  24. dependencies {
  25. library("org.springframework.data:spring-data-commons:1.8.0.RELEASE")
  26. compileOnly("org.springframework:spring-aop:1.2")
  27. testInstrumentation(project(":instrumentation:jdbc:javaagent"))
  28. testImplementation(project(":instrumentation:spring:spring-data:spring-data-common:testing"))
  29. testLibrary("org.hibernate:hibernate-entitymanager:4.3.0.Final")
  30. testLibrary("org.springframework.data:spring-data-jpa:1.8.0.RELEASE")
  31. testLibrary("org.springframework:spring-test:3.0.0.RELEASE")
  32. testImplementation("org.hsqldb:hsqldb:2.0.0")
  33. // limit to spring 5; spring 6 is tested in its separate module
  34. latestDepTestLibrary("org.hibernate:hibernate-entitymanager:5.+")
  35. latestDepTestLibrary("org.springframework.data:spring-data-commons:2.+")
  36. latestDepTestLibrary("org.springframework.data:spring-data-jpa:2.+")
  37. latestDepTestLibrary("org.springframework:spring-test:5.+")
  38. }
  39. tasks {
  40. test {
  41. jvmArgs("--add-opens=java.base/java.lang.invoke=ALL-UNNAMED")
  42. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  43. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  44. }
  45. }