Skip to content

Commit 73c3288

Browse files
authored
Append aws suffix in agent manifest (#53)
1 parent 913ce1a commit 73c3288

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

otelagent/build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,15 @@ tasks {
7070
attributes.put("Premain-Class", "software.amazon.opentelemetry.javaagent.bootstrap.AwsAgentBootstrap")
7171
attributes.put("Can-Redefine-Classes", "true")
7272
attributes.put("Can-Retransform-Classes", "true")
73-
attributes.put("Implementation-Version", project.version)
73+
74+
val versionString = project.version.toString()
75+
val implementationVersion: String
76+
if (versionString.endsWith("-SNAPSHOT")) {
77+
implementationVersion = "${versionString.dropLast("-SNAPSHOT".length)}-aws-SNAPSHOT"
78+
} else {
79+
implementationVersion = "$versionString-aws"
80+
}
81+
attributes.put("Implementation-Version", implementationVersion)
7482
}
7583
}
7684
}

0 commit comments

Comments
 (0)