Skip to content

Commit 78d9bec

Browse files
committed
Two minor changes:
Move the JUnit dependency to the SPI project. Retain the Contrib patch script.
1 parent 076d030 commit 78d9bec

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ allprojects {
108108
testImplementation("org.junit.jupiter:junit-jupiter-api")
109109
testImplementation("org.junit.jupiter:junit-jupiter-params")
110110
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
111-
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
112111
}
113112

114113
spotless {

instrumentation/aws-sdk/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ dependencies {
4141
testImplementation("com.amazonaws:aws-java-sdk-sns:1.11.106")
4242
testImplementation("com.amazonaws:aws-java-sdk-stepfunctions:1.11.230")
4343
testImplementation("com.amazonaws:aws-java-sdk-secretsmanager:1.11.309")
44+
45+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
4446
}

lambda-layer/build-layer.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,22 @@ patch -p1 < "$SOURCEDIR"/patches/opentelemetry-java-instrumentation.patch
2929
popd
3030
rm -rf opentelemetry-java-instrumentation
3131

32+
contrib_version=$(awk -F'=v' '/OTEL_JAVA_CONTRIB_VERSION/ {print $2}' "$file")
33+
if [[ -n "$contrib_version" ]]; then
34+
echo "Found OTEL Contrib Version: ${contrib_version}"
35+
## Clone and Patch the OpenTelemetry Java contrib Repository
36+
echo "Info: Cloning and Patching OpenTelemetry Java contrib Repository"
37+
git clone https://github.com/open-telemetry/opentelemetry-java-contrib.git
38+
pushd opentelemetry-java-contrib
39+
git checkout v${contrib_version} -b tag-v${contrib_version}
40+
41+
# There is another patch in the .github/patches directory for other changes. We should apply them too for consistency.
42+
patch -p1 < "$SOURCEDIR"/../.github/patches/opentelemetry-java-contrib.patch
43+
44+
./gradlew publishToMavenLocal
45+
popd
46+
rm -rf opentelemetry-java-contrib
47+
fi
3248

3349
## Build the ADOT Java from current source
3450
echo "Info: Building ADOT Java from current source"

0 commit comments

Comments
 (0)