build.gradle.kts 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. // Resteasy changes a class's package in 3.1.0 then moves it back in 3.5.0 and then moves it forward again in 4.0.0
  6. // so the jaxrs-2.0-resteasy-3.0 module applies to [3.0, 3.1) and [3.5, 4.0)
  7. // and the jaxrs-2.0-resteasy-3.1 module applies to [3.1, 3.5) and [4.0, )
  8. pass {
  9. group.set("org.jboss.resteasy")
  10. module.set("resteasy-jaxrs")
  11. versions.set("[3.1.0.Final,3.5.0.Final)")
  12. }
  13. pass {
  14. group.set("org.jboss.resteasy")
  15. module.set("resteasy-core")
  16. versions.set("[4.0.0.Final,6)")
  17. }
  18. fail {
  19. group.set("org.jboss.resteasy")
  20. module.set("resteasy-jaxrs")
  21. versions.set("(2.1.0.GA,3.1.0.Final)")
  22. // missing dependencies
  23. skip("2.3.10.Final")
  24. }
  25. fail {
  26. group.set("org.jboss.resteasy")
  27. module.set("resteasy-core")
  28. versions.set("[6.0.0.Final,)")
  29. }
  30. }
  31. dependencies {
  32. compileOnly("javax.ws.rs:javax.ws.rs-api:2.0")
  33. library("org.jboss.resteasy:resteasy-jaxrs:3.1.0.Final")
  34. implementation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-common:javaagent"))
  35. implementation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-common:javaagent"))
  36. testInstrumentation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-annotations:javaagent"))
  37. testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
  38. testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
  39. testImplementation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-common:testing"))
  40. testImplementation("org.eclipse.jetty:jetty-webapp:9.4.6.v20170531")
  41. testLibrary("org.jboss.resteasy:resteasy-undertow:3.1.0.Final") {
  42. exclude("org.jboss.resteasy", "resteasy-client")
  43. }
  44. testLibrary("org.jboss.resteasy:resteasy-servlet-initializer:3.1.0.Final")
  45. // artifact name changed from 'resteasy-jaxrs' to 'resteasy-core' starting from version 4.0.0
  46. latestDepTestLibrary("org.jboss.resteasy:resteasy-core:5.+")
  47. latestDepTestLibrary("org.jboss.resteasy:resteasy-servlet-initializer:5.+")
  48. latestDepTestLibrary("org.jboss.resteasy:resteasy-undertow:5.+") {
  49. exclude("org.jboss.resteasy", "resteasy-client")
  50. }
  51. }
  52. tasks {
  53. test {
  54. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  55. }
  56. withType<Test>().configureEach {
  57. // TODO run tests both with and without experimental span attributes
  58. jvmArgs("-Dotel.instrumentation.jaxrs.experimental-span-attributes=true")
  59. }
  60. }
  61. if (findProperty("testLatestDeps") as Boolean) {
  62. configurations {
  63. // artifact name changed from 'resteasy-jaxrs' to 'resteasy-core' starting from version 4.0.0
  64. testImplementation {
  65. exclude("org.jboss.resteasy", "resteasy-jaxrs")
  66. }
  67. }
  68. }