build.gradle.kts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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", "3.3.16", "3.3.17", "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: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. latestDepTestLibrary("org.springframework.boot:spring-boot-autoconfigure:2.+")
  31. latestDepTestLibrary("org.springframework.boot:spring-boot-starter-tomcat:2.+")
  32. }
  33. // testing-common pulls in groovy 4 and spock as dependencies, exclude them
  34. configurations.configureEach {
  35. exclude("org.apache.groovy", "groovy")
  36. exclude("org.apache.groovy", "groovy-json")
  37. exclude("org.spockframework", "spock-core")
  38. }
  39. configurations.configureEach {
  40. if (!name.contains("muzzle")) {
  41. resolutionStrategy {
  42. eachDependency {
  43. if (requested.group == "org.codehaus.groovy") {
  44. useVersion("3.0.9")
  45. }
  46. }
  47. }
  48. }
  49. }
  50. configurations.testRuntimeClasspath {
  51. resolutionStrategy {
  52. // requires old logback (and therefore also old slf4j)
  53. force("ch.qos.logback:logback-classic:1.2.11")
  54. force("org.slf4j:slf4j-api:1.7.36")
  55. }
  56. }
  57. val latestDepTest = findProperty("testLatestDeps") as Boolean
  58. tasks {
  59. withType<Test>().configureEach {
  60. systemProperty("testLatestDeps", latestDepTest)
  61. // required on jdk17
  62. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  63. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  64. }
  65. }