build.gradle.kts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("org.springframework.amqp")
  7. module.set("spring-rabbit")
  8. versions.set("(,)")
  9. // Problematic release depending on snapshots
  10. skip("1.6.4.RELEASE", "2.1.1.RELEASE")
  11. }
  12. }
  13. dependencies {
  14. library("org.springframework.amqp:spring-rabbit:1.0.0.RELEASE")
  15. testInstrumentation(project(":instrumentation:rabbitmq-2.7:javaagent"))
  16. // 2.1.7 adds the @RabbitListener annotation, we need that for tests
  17. testLibrary("org.springframework.amqp:spring-rabbit:2.1.7.RELEASE")
  18. testLibrary("org.springframework.boot:spring-boot-starter-test:1.5.22.RELEASE")
  19. testLibrary("org.springframework.boot:spring-boot-starter:1.5.22.RELEASE")
  20. }
  21. tasks {
  22. test {
  23. usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
  24. }
  25. }
  26. val latestDepTest = findProperty("testLatestDeps") as Boolean
  27. // spring 6 requires java 17
  28. if (latestDepTest) {
  29. otelJava {
  30. minJavaVersionSupported.set(JavaVersion.VERSION_17)
  31. }
  32. }
  33. // spring 6 uses slf4j 2.0
  34. if (!latestDepTest) {
  35. configurations.testRuntimeClasspath {
  36. resolutionStrategy {
  37. // requires old logback (and therefore also old slf4j)
  38. force("ch.qos.logback:logback-classic:1.2.11")
  39. force("org.slf4j:slf4j-api:1.7.36")
  40. }
  41. }
  42. }