build.gradle.kts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. compileOnly("com.typesafe.play:play_2.11:2.4.0")
  31. testInstrumentation(project(":instrumentation:netty:netty-3.8:javaagent"))
  32. testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
  33. testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
  34. testInstrumentation(project(":instrumentation:akka:akka-http-10.0:javaagent"))
  35. testInstrumentation(project(":instrumentation:async-http-client:async-http-client-1.9:javaagent"))
  36. testInstrumentation(project(":instrumentation:async-http-client:async-http-client-2.0:javaagent"))
  37. testLibrary("com.typesafe.play:play-java_2.11:2.5.0")
  38. testLibrary("com.typesafe.play:play-java-ws_2.11:2.5.0")
  39. testLibrary("com.typesafe.play:play-test_2.11:2.5.0")
  40. latestDepTestLibrary("com.typesafe.play:play-java_2.11:2.5.+") // see play-2.6 module
  41. latestDepTestLibrary("com.typesafe.play:play-java-ws_2.11:2.5.+") // see play-2.6 module
  42. latestDepTestLibrary("com.typesafe.play:play-test_2.11:2.5.+")
  43. }
  44. testing {
  45. suites {
  46. val play24Test by registering(JvmTestSuite::class) {
  47. dependencies {
  48. implementation("com.typesafe.play:play-java_2.11:2.4.0")
  49. implementation("com.typesafe.play:play-java-ws_2.11:2.4.0")
  50. implementation("com.typesafe.play:play-test_2.11:2.4.0")
  51. }
  52. }
  53. }
  54. }
  55. tasks {
  56. check {
  57. dependsOn(testing.suites)
  58. }
  59. }
  60. // play-test depends on websocket-client
  61. configurations.configureEach {
  62. exclude("org.eclipse.jetty.websocket", "websocket-client")
  63. }
  64. // async-http-client 2.0 does not work with Netty versions newer than this due to referencing an
  65. // internal file.
  66. if (!(findProperty("testLatestDeps") as Boolean)) {
  67. configurations.configureEach {
  68. resolutionStrategy {
  69. eachDependency {
  70. // specifying a fixed version for all libraries with io.netty' group
  71. if (requested.group == "io.netty" && requested.name != "netty-bom" && requested.name != "netty") {
  72. useVersion("4.0.34.Final")
  73. }
  74. }
  75. }
  76. }
  77. }