build.gradle.kts 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. testInstrumentation(project(":instrumentation:undertow-1.4:javaagent"))
  40. testInstrumentation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-cxf-3.2:javaagent"))
  41. testInstrumentation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-jersey-2.0:javaagent"))
  42. testInstrumentation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-3.0:javaagent"))
  43. testInstrumentation(project(":instrumentation:jaxrs:jaxrs-3.0:jaxrs-3.0-jersey-3.0:javaagent"))
  44. testInstrumentation(project(":instrumentation:jaxrs:jaxrs-3.0:jaxrs-3.0-resteasy-6.0:javaagent"))
  45. testImplementation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-common:testing"))
  46. testImplementation("org.eclipse.jetty:jetty-webapp:9.4.6.v20170531")
  47. testLibrary("org.jboss.resteasy:resteasy-undertow:3.1.0.Final") {
  48. exclude("org.jboss.resteasy", "resteasy-client")
  49. }
  50. testLibrary("org.jboss.resteasy:resteasy-servlet-initializer:3.1.0.Final")
  51. // artifact name changed from 'resteasy-jaxrs' to 'resteasy-core' starting from version 4.0.0
  52. latestDepTestLibrary("org.jboss.resteasy:resteasy-core:5.+")
  53. latestDepTestLibrary("org.jboss.resteasy:resteasy-servlet-initializer:5.+")
  54. latestDepTestLibrary("org.jboss.resteasy:resteasy-undertow:5.+") {
  55. exclude("org.jboss.resteasy", "resteasy-client")
  56. }
  57. }
  58. tasks {
  59. test {
  60. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  61. }
  62. withType<Test>().configureEach {
  63. // TODO run tests both with and without experimental span attributes
  64. jvmArgs("-Dotel.instrumentation.jaxrs.experimental-span-attributes=true")
  65. jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
  66. }
  67. }
  68. if (findProperty("testLatestDeps") as Boolean) {
  69. configurations {
  70. // artifact name changed from 'resteasy-jaxrs' to 'resteasy-core' starting from version 4.0.0
  71. testImplementation {
  72. exclude("org.jboss.resteasy", "resteasy-jaxrs")
  73. }
  74. }
  75. }