build.gradle.kts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("org.grails")
  7. module.set("grails-web-url-mappings")
  8. versions.set("[3.0,)")
  9. // version 3.1.15 depends on org.grails:grails-datastore-core:5.0.13.BUILD-SNAPSHOT
  10. // which (obviously) does not exist
  11. // version 3.3.6 depends on org.grails:grails-datastore-core:6.1.10.BUILD-SNAPSHOT
  12. // which (also obviously) does not exist
  13. skip("3.1.15", "3.3.6")
  14. // these versions pass if you add the grails maven repository (https://repo.grails.org/artifactory/core)
  15. skip("3.2.0", "3.3.0", "3.3.1", "3.3.2", "3.3.3", "3.3.10", "3.3.13", "3.3.14", "3.3.15", "4.0.0", "4.0.1", "4.0.5", "4.0.6", "4.0.7", "4.0.8", "4.0.9", "4.0.10", "4.0.11", "4.0.12", "4.0.13")
  16. assertInverse.set(true)
  17. }
  18. }
  19. val grailsVersion = "3.0.6" // first version that the tests pass on
  20. val springBootVersion = "1.2.5.RELEASE"
  21. dependencies {
  22. bootstrap(project(":instrumentation:servlet:servlet-common:bootstrap"))
  23. library("org.grails:grails-plugin-url-mappings:$grailsVersion")
  24. testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
  25. testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
  26. testInstrumentation(project(":instrumentation:tomcat:tomcat-7.0:javaagent"))
  27. testInstrumentation(project(":instrumentation:spring:spring-webmvc-3.1:javaagent"))
  28. testLibrary("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion")
  29. testLibrary("org.springframework.boot:spring-boot-starter-tomcat:$springBootVersion")
  30. }
  31. // testing-common pulls in groovy 4 and spock as dependencies, exclude them
  32. configurations.configureEach {
  33. exclude("org.apache.groovy", "groovy")
  34. exclude("org.apache.groovy", "groovy-json")
  35. exclude("org.spockframework", "spock-core")
  36. }
  37. configurations.configureEach {
  38. if (!name.contains("muzzle")) {
  39. resolutionStrategy {
  40. eachDependency {
  41. if (requested.group == "org.codehaus.groovy") {
  42. useVersion("3.0.9")
  43. }
  44. }
  45. }
  46. }
  47. }
  48. tasks.withType<Test>().configureEach {
  49. // required on jdk17
  50. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  51. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  52. }