build.gradle.kts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. fail {
  6. group.set("com.vaadin")
  7. module.set("flow-server")
  8. versions.set("[,2.2.0)")
  9. }
  10. pass {
  11. group.set("com.vaadin")
  12. module.set("flow-server")
  13. versions.set("[2.2.0,3)")
  14. }
  15. fail {
  16. group.set("com.vaadin")
  17. module.set("flow-server")
  18. versions.set("[3.0.0,3.1.0)")
  19. }
  20. pass {
  21. group.set("com.vaadin")
  22. module.set("flow-server")
  23. versions.set("[3.1.0,)")
  24. }
  25. }
  26. dependencies {
  27. compileOnly("com.google.auto.value:auto-value-annotations")
  28. annotationProcessor("com.google.auto.value:auto-value")
  29. bootstrap(project(":instrumentation:servlet:servlet-common:bootstrap"))
  30. compileOnly("com.vaadin:flow-server:2.2.0")
  31. testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
  32. testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
  33. testInstrumentation(project(":instrumentation:tomcat:tomcat-7.0:javaagent"))
  34. testInstrumentation(project(":instrumentation:servlet:servlet-5.0:javaagent"))
  35. testInstrumentation(project(":instrumentation:tomcat:tomcat-10.0:javaagent"))
  36. }
  37. testing {
  38. suites {
  39. val vaadin142Test by registering(JvmTestSuite::class) {
  40. dependencies {
  41. implementation(project(":instrumentation:vaadin-14.2:testing"))
  42. implementation("com.vaadin:vaadin-spring-boot-starter:14.2.0")
  43. }
  44. }
  45. val vaadin16Test by registering(JvmTestSuite::class) {
  46. dependencies {
  47. implementation(project(":instrumentation:vaadin-14.2:testing"))
  48. implementation("com.vaadin:vaadin-spring-boot-starter:16.0.0")
  49. }
  50. }
  51. val vaadin14LatestTest by registering(JvmTestSuite::class) {
  52. dependencies {
  53. implementation(project(":instrumentation:vaadin-14.2:testing"))
  54. implementation("com.vaadin:vaadin-spring-boot-starter:14.+")
  55. }
  56. }
  57. val vaadinLatestTest by registering(JvmTestSuite::class) {
  58. dependencies {
  59. implementation(project(":instrumentation:vaadin-14.2:testing"))
  60. // tests fail with 24.4.1
  61. implementation("com.vaadin:vaadin-spring-boot-starter:24.3.13")
  62. }
  63. }
  64. }
  65. }
  66. tasks {
  67. withType<Test>().configureEach {
  68. usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
  69. }
  70. check {
  71. if (findProperty("testLatestDeps") as Boolean) {
  72. dependsOn(testing.suites.named("vaadin14LatestTest"), testing.suites.named("vaadinLatestTest"))
  73. } else {
  74. dependsOn(testing.suites.named("vaadin142Test"), testing.suites.named("vaadin16Test"))
  75. }
  76. }
  77. }
  78. configurations.configureEach {
  79. if (!this.name.startsWith("vaadinLatestTest")) {
  80. resolutionStrategy {
  81. // requires old logback (and therefore also old slf4j)
  82. force("ch.qos.logback:logback-classic:1.2.11")
  83. force("org.slf4j:slf4j-api:1.7.36")
  84. }
  85. }
  86. }
  87. tasks.withType<Test>().configureEach {
  88. jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
  89. jvmArgs("-Dotel.instrumentation.common.experimental.view-telemetry.enabled=true")
  90. }