build.gradle.kts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. }
  19. testing {
  20. suites {
  21. val testCoreOnly by registering(JvmTestSuite::class) {
  22. sources {
  23. groovy {
  24. setSrcDirs(listOf("src/testCoreOnly/groovy"))
  25. }
  26. }
  27. dependencies {
  28. implementation(project())
  29. implementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:testing"))
  30. compileOnly("software.amazon.awssdk:sqs:2.2.0")
  31. if (findProperty("testLatestDeps") as Boolean) {
  32. implementation("software.amazon.awssdk:aws-core:+")
  33. implementation("software.amazon.awssdk:aws-json-protocol:+")
  34. implementation("software.amazon.awssdk:dynamodb:+")
  35. } else {
  36. implementation("software.amazon.awssdk:aws-core:2.2.0")
  37. implementation("software.amazon.awssdk:aws-json-protocol:2.2.0")
  38. implementation("software.amazon.awssdk:dynamodb:2.2.0")
  39. }
  40. }
  41. }
  42. }
  43. }
  44. tasks {
  45. withType<Test> {
  46. // NB: If you'd like to change these, there is some cleanup work to be done, as most tests ignore this and
  47. // set the value directly (the "library" does not normally query it, only library-autoconfigure)
  48. systemProperty("otel.instrumentation.aws-sdk.experimental-span-attributes", true)
  49. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  50. }
  51. }