build.gradle.kts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. val scalaVersion = "2.11"
  5. val playVersion = "2.6.0"
  6. muzzle {
  7. pass {
  8. group.set("com.typesafe.play")
  9. module.set("play_$scalaVersion")
  10. versions.set("[$playVersion,)")
  11. assertInverse.set(true)
  12. // versions 2.3.9 and 2.3.10 depends on com.typesafe.netty:netty-http-pipelining:1.1.2
  13. // which does not exist
  14. skip("2.3.9", "2.3.10")
  15. }
  16. pass {
  17. group.set("com.typesafe.play")
  18. module.set("play_2.12")
  19. versions.set("[$playVersion,)")
  20. assertInverse.set(true)
  21. }
  22. pass {
  23. group.set("com.typesafe.play")
  24. module.set("play_2.13")
  25. versions.set("[$playVersion,)")
  26. assertInverse.set(true)
  27. }
  28. }
  29. otelJava {
  30. // Play doesn't work with Java 9+ until 2.6.12
  31. maxJavaVersionForTests.set(JavaVersion.VERSION_1_8)
  32. }
  33. dependencies {
  34. // TODO(anuraaga): Something about library configuration doesn't work well with scala compilation
  35. // here.
  36. compileOnly("com.typesafe.play:play_$scalaVersion:$playVersion")
  37. testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
  38. testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
  39. testInstrumentation(project(":instrumentation:akka:akka-actor-2.3:javaagent"))
  40. testInstrumentation(project(":instrumentation:akka:akka-http-10.0:javaagent"))
  41. testImplementation("com.typesafe.play:play-java_$scalaVersion:$playVersion")
  42. testImplementation("com.typesafe.play:play-test_$scalaVersion:$playVersion")
  43. }
  44. testing {
  45. suites {
  46. val latestDepTest by registering(JvmTestSuite::class) {
  47. dependencies {
  48. implementation("com.typesafe.play:play-java_2.13:2.8.+")
  49. implementation("com.typesafe.play:play-test_2.13:2.8.+")
  50. implementation("com.typesafe.play:play-akka-http-server_2.13:2.8.+")
  51. }
  52. }
  53. }
  54. }
  55. tasks {
  56. if (findProperty("testLatestDeps") as Boolean) {
  57. // disable regular test running and compiling tasks when latest dep test task is run
  58. named("test") {
  59. enabled = false
  60. }
  61. named("compileTestGroovy") {
  62. enabled = false
  63. }
  64. check {
  65. dependsOn(testing.suites)
  66. }
  67. }
  68. }
  69. // play-test depends on websocket-client
  70. configurations.configureEach {
  71. exclude("org.eclipse.jetty.websocket", "websocket-client")
  72. }