build.gradle.kts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("io.vertx")
  7. module.set("vertx-web")
  8. versions.set("[3.0.0,)")
  9. assertInverse.set(true)
  10. }
  11. }
  12. dependencies {
  13. compileOnly("io.vertx:vertx-web:3.0.0")
  14. // We need both version as different versions of Vert.x use different versions of Netty
  15. testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
  16. testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
  17. testInstrumentation(project(":instrumentation:jdbc:javaagent"))
  18. }
  19. testing {
  20. suites {
  21. val version3Test by registering(JvmTestSuite::class) {
  22. dependencies {
  23. implementation(project(":instrumentation:vertx:vertx-web-3.0:testing"))
  24. implementation("io.vertx:vertx-web:3.0.0")
  25. implementation("io.vertx:vertx-jdbc-client:3.0.0")
  26. implementation("io.vertx:vertx-codegen:3.0.0")
  27. implementation("io.vertx:vertx-docgen:3.0.0")
  28. }
  29. }
  30. val latestDepTest by registering(JvmTestSuite::class) {
  31. dependencies {
  32. implementation(project(":instrumentation:vertx:vertx-web-3.0:testing"))
  33. implementation("io.vertx:vertx-web:+")
  34. implementation("io.vertx:vertx-jdbc-client:+")
  35. implementation("io.vertx:vertx-codegen:+")
  36. }
  37. }
  38. }
  39. }
  40. tasks {
  41. if (findProperty("testLatestDeps") as Boolean) {
  42. // disable regular test running and compiling tasks when latest dep test task is run
  43. named("test") {
  44. enabled = false
  45. }
  46. named("compileTestGroovy") {
  47. enabled = false
  48. }
  49. check {
  50. dependsOn(testing.suites)
  51. }
  52. }
  53. tasks {
  54. val testStableSemconv by registering(Test::class) {
  55. jvmArgs("-Dotel.semconv-stability.opt-in=http")
  56. }
  57. check {
  58. dependsOn(testStableSemconv)
  59. }
  60. }
  61. }