build.gradle.kts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. testImplementation("org.spockframework:spock-spring")
  28. testLibrary("org.springframework:spring-test:3.0.0.RELEASE")
  29. testLibrary("org.springframework.data:spring-data-jpa:1.8.0.RELEASE")
  30. // JPA dependencies
  31. testInstrumentation(project(":instrumentation:jdbc:javaagent"))
  32. testImplementation("com.mysema.querydsl:querydsl-jpa:3.7.4")
  33. testImplementation("org.hsqldb:hsqldb:2.0.0")
  34. testLibrary("org.hibernate:hibernate-entitymanager:4.3.0.Final")
  35. latestDepTestLibrary("org.hibernate:hibernate-entitymanager:5.+")
  36. }
  37. tasks.withType<Test>().configureEach {
  38. // required on jdk17
  39. jvmArgs("--add-opens=java.base/java.lang.invoke=ALL-UNNAMED")
  40. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  41. }