File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,28 @@ java {
19
19
20
20
spotless {
21
21
java {
22
- googleJavaFormat(" 1.9 " )
22
+ googleJavaFormat(" 1.15.0 " )
23
23
}
24
24
}
25
25
26
+ val javaagentDependency by configurations.creating {
27
+ extendsFrom()
28
+ }
29
+
26
30
dependencies {
27
31
compileOnly(platform(" io.opentelemetry:opentelemetry-bom:1.25.0" ))
28
32
compileOnly(platform(" io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha" ))
29
33
// Already included in wrapper so compileOnly
30
34
compileOnly(" io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi" )
31
35
compileOnly(" io.opentelemetry:opentelemetry-sdk-extension-aws" )
36
+ javaagentDependency(" software.amazon.opentelemetry:aws-opentelemetry-agent:1.26.0" )
37
+ }
38
+
39
+ tasks.register<Copy >(" download" ) {
40
+ from(javaagentDependency)
41
+ into(" $buildDir /javaagent" )
42
+ }
43
+
44
+ tasks.named(" build" ) {
45
+ dependsOn(" download" )
32
46
}
Original file line number Diff line number Diff line change @@ -19,16 +19,16 @@ cp ./build/libs/aws-otel-lambda-java-extensions.jar ../opentelemetry-lambda/java
19
19
# Go to OTel Lambda Java folder
20
20
cd ../opentelemetry-lambda/java || exit
21
21
22
- # Build the OTel Lambda Java folder which has ADOT Lambda Java configured code
23
- OTEL_VERSION=1.24.0
24
- ./gradlew build -Potel.lambda.javaagent.dependency=software.amazon.opentelemetry:aws-opentelemetry-agent:$OTEL_VERSION
22
+ ./gradlew build
25
23
26
24
# Combine Java Agent build and ADOT Collector
27
25
pushd ./layer-javaagent/build/distributions || exit
28
26
unzip -qo opentelemetry-javaagent-layer.zip
29
27
rm opentelemetry-javaagent-layer.zip
30
28
mv otel-handler otel-handler-upstream
31
29
cp " $SOURCEDIR " /scripts/otel-handler .
30
+ # Copy ADOT Java Agent downloaded using Gradle task
31
+ cp " $SOURCEDIR " /build/javaagent/aws-opentelemetry-agent* .jar ./opentelemetry-javaagent.jar
32
32
unzip -qo ../../../../collector/build/collector-extension-$1 .zip
33
33
zip -qr opentelemetry-javaagent-layer.zip *
34
34
popd || exit
You can’t perform that action at this time.
0 commit comments