build.gradle.kts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("com.typesafe.play")
  7. module.set("play_2.11")
  8. versions.set("[2.4.0,2.6)")
  9. assertInverse.set(true)
  10. // versions 2.3.9 and 2.3.10 depends on com.typesafe.netty:netty-http-pipelining:1.1.2
  11. // which does not exist
  12. skip("2.3.9", "2.3.10")
  13. }
  14. fail {
  15. group.set("com.typesafe.play")
  16. module.set("play_2.12")
  17. versions.set("[,]")
  18. }
  19. fail {
  20. group.set("com.typesafe.play")
  21. module.set("play_2.13")
  22. versions.set("[,]")
  23. }
  24. }
  25. otelJava {
  26. // Play doesn't work with Java 9+ until 2.6.12
  27. maxJavaVersionForTests.set(JavaVersion.VERSION_1_8)
  28. }
  29. dependencies {
  30. // TODO(anuraaga): Something about library configuration doesn't work well with scala compilation
  31. // here.
  32. compileOnly("com.typesafe.play:play_2.11:2.4.0")
  33. testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
  34. testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
  35. testInstrumentation(project(":instrumentation:akka-http-10.0:javaagent"))
  36. testInstrumentation(project(":instrumentation:async-http-client:async-http-client-2.0:javaagent"))
  37. // Before 2.5, play used netty 3.x which isn't supported, so for better test consistency, we test with just 2.5
  38. testLibrary("com.typesafe.play:play-java_2.11:2.5.0")
  39. testLibrary("com.typesafe.play:play-java-ws_2.11:2.5.0")
  40. testLibrary("com.typesafe.play:play-test_2.11:2.5.0") {
  41. exclude("org.eclipse.jetty.websocket", "websocket-client")
  42. }
  43. latestDepTestLibrary("com.typesafe.play:play-java_2.11:2.5.+")
  44. latestDepTestLibrary("com.typesafe.play:play-java-ws_2.11:2.5.+")
  45. latestDepTestLibrary("com.typesafe.play:play-test_2.11:2.5.+") {
  46. exclude("org.eclipse.jetty.websocket", "websocket-client")
  47. }
  48. }
  49. // async-http-client 2.0 does not work with Netty versions newer than this due to referencing an
  50. // internal file.
  51. if (!(findProperty("testLatestDeps") as Boolean)) {
  52. configurations.configureEach {
  53. resolutionStrategy {
  54. eachDependency {
  55. // specifying a fixed version for all libraries with io.netty' group
  56. if (requested.group == "io.netty" && requested.name != "netty-bom" && requested.name != "netty") {
  57. useVersion("4.0.34.Final")
  58. }
  59. }
  60. }
  61. }
  62. }