-
Notifications
You must be signed in to change notification settings - Fork 917
/
Copy pathbuild.gradle.kts
95 lines (84 loc) · 3.55 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
plugins {
id("otel.library-instrumentation")
}
dependencies {
implementation("io.opentelemetry.contrib:opentelemetry-aws-xray-propagator")
library("software.amazon.awssdk:aws-core:2.2.0")
library("software.amazon.awssdk:sqs:2.2.0")
library("software.amazon.awssdk:lambda:2.2.0")
library("software.amazon.awssdk:sns:2.2.0")
library("software.amazon.awssdk:aws-json-protocol:2.2.0")
// json-utils was added in 2.17.0
compileOnly("software.amazon.awssdk:json-utils:2.17.0")
compileOnly(project(":muzzle")) // For @NoMuzzle
// Don't use library to make sure base test is run with the floor version.
// bedrock runtime is tested separately in testBedrockRuntime.
// First release with Converse API
compileOnly("software.amazon.awssdk:bedrockruntime:2.25.63")
testImplementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:testing"))
testLibrary("software.amazon.awssdk:dynamodb:2.2.0")
testLibrary("software.amazon.awssdk:ec2:2.2.0")
testLibrary("software.amazon.awssdk:kinesis:2.2.0")
testLibrary("software.amazon.awssdk:rds:2.2.0")
testLibrary("software.amazon.awssdk:s3:2.2.0")
testLibrary("software.amazon.awssdk:ses:2.2.0")
}
testing {
suites {
val testCoreOnly by registering(JvmTestSuite::class) {
dependencies {
implementation(project())
implementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:testing"))
compileOnly("software.amazon.awssdk:sqs:2.2.0")
if (findProperty("testLatestDeps") as Boolean) {
implementation("software.amazon.awssdk:aws-core:latest.release")
implementation("software.amazon.awssdk:aws-json-protocol:latest.release")
implementation("software.amazon.awssdk:dynamodb:latest.release")
implementation("software.amazon.awssdk:lambda:latest.release")
} else {
implementation("software.amazon.awssdk:aws-core:2.2.0")
implementation("software.amazon.awssdk:aws-json-protocol:2.2.0")
implementation("software.amazon.awssdk:dynamodb:2.2.0")
implementation("software.amazon.awssdk:lambda:2.2.0")
}
}
}
val testLambda by registering(JvmTestSuite::class) {
dependencies {
implementation(project())
implementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:testing"))
if (findProperty("testLatestDeps") as Boolean) {
implementation("software.amazon.awssdk:lambda:latest.release")
} else {
implementation("software.amazon.awssdk:lambda:2.17.0")
}
}
}
val testBedrockRuntime by registering(JvmTestSuite::class) {
dependencies {
implementation(project())
implementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:testing"))
if (findProperty("testLatestDeps") as Boolean) {
implementation("software.amazon.awssdk:bedrockruntime:latest.release")
} else {
implementation("software.amazon.awssdk:bedrockruntime:2.25.63")
}
}
}
}
}
tasks {
withType<Test>().configureEach {
// NB: If you'd like to change these, there is some cleanup work to be done, as most tests ignore this and
// set the value directly (the "library" does not normally query it, only library-autoconfigure)
systemProperty("otel.instrumentation.aws-sdk.experimental-span-attributes", true)
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
}
val testStableSemconv by registering(Test::class) {
jvmArgs("-Dotel.semconv-stability.opt-in=database")
}
check {
dependsOn(testing.suites)
dependsOn(testStableSemconv)
}
}