build.gradle.kts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. plugins {
  2. id("otel.library-instrumentation")
  3. }
  4. dependencies {
  5. implementation("io.opentelemetry.contrib:opentelemetry-aws-xray-propagator")
  6. library("software.amazon.awssdk:aws-core:2.2.0")
  7. library("software.amazon.awssdk:sqs:2.2.0")
  8. library("software.amazon.awssdk:sns:2.2.0")
  9. library("software.amazon.awssdk:aws-json-protocol:2.2.0")
  10. compileOnly(project(":muzzle")) // For @NoMuzzle
  11. testImplementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:testing"))
  12. testLibrary("software.amazon.awssdk:dynamodb:2.2.0")
  13. testLibrary("software.amazon.awssdk:ec2:2.2.0")
  14. testLibrary("software.amazon.awssdk:kinesis:2.2.0")
  15. testLibrary("software.amazon.awssdk:rds:2.2.0")
  16. testLibrary("software.amazon.awssdk:s3:2.2.0")
  17. testLibrary("software.amazon.awssdk:ses:2.2.0")
  18. // last version that does not use json protocol
  19. latestDepTestLibrary("software.amazon.awssdk:sqs:2.21.17")
  20. }
  21. testing {
  22. suites {
  23. val testCoreOnly by registering(JvmTestSuite::class) {
  24. sources {
  25. groovy {
  26. setSrcDirs(listOf("src/testCoreOnly/groovy"))
  27. }
  28. }
  29. dependencies {
  30. implementation(project())
  31. implementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:testing"))
  32. compileOnly("software.amazon.awssdk:sqs:2.2.0")
  33. if (findProperty("testLatestDeps") as Boolean) {
  34. implementation("software.amazon.awssdk:aws-core:+")
  35. implementation("software.amazon.awssdk:aws-json-protocol:+")
  36. implementation("software.amazon.awssdk:dynamodb:+")
  37. } else {
  38. implementation("software.amazon.awssdk:aws-core:2.2.0")
  39. implementation("software.amazon.awssdk:aws-json-protocol:2.2.0")
  40. implementation("software.amazon.awssdk:dynamodb:2.2.0")
  41. }
  42. }
  43. }
  44. }
  45. }
  46. tasks {
  47. withType<Test> {
  48. // NB: If you'd like to change these, there is some cleanup work to be done, as most tests ignore this and
  49. // set the value directly (the "library" does not normally query it, only library-autoconfigure)
  50. systemProperty("otel.instrumentation.aws-sdk.experimental-span-attributes", true)
  51. systemProperty("otel.instrumentation.aws-sdk.experimental-use-propagator-for-messaging", true)
  52. }
  53. }