Skip to content

Commit 3374733

Browse files
authored
Merge pull request #7412 from DataDog/ban/embed-cwstls-always
Make cws-tls use the same JNA dependency as instrumentations
2 parents 0c98a58 + 048905f commit 3374733

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

dd-java-agent/build.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ includeSubprojShadowJar ':dd-java-agent:agent-iast', 'iast'
117117
includeSubprojShadowJar ':dd-java-agent:agent-debugger', 'debugger'
118118
includeSubprojShadowJar ':dd-java-agent:agent-ci-visibility', 'ci-visibility'
119119
includeSubprojShadowJar ':dd-java-agent:agent-logs-intake', 'logs-intake'
120-
if (project.rootProject.hasProperty("agentIncludeCwsTls") && agentIncludeCwsTls) {
121-
includeSubprojShadowJar ':dd-java-agent:cws-tls', 'cws-tls'
122-
}
120+
includeSubprojShadowJar ':dd-java-agent:cws-tls', 'cws-tls'
123121

124122
def sharedShadowJar = tasks.register('sharedShadowJar', ShadowJar) {
125123
configurations = [project.configurations.sharedShadowInclude]
@@ -286,8 +284,7 @@ tasks.register('checkAgentJarSize').configure {
286284
doLast {
287285
// Arbitrary limit to prevent unintentional increases to the agent jar size
288286
// Raise or lower as required
289-
def megs = (project.rootProject.hasProperty("agentIncludeCwsTls") && agentIncludeCwsTls) ? 30 : 29
290-
assert shadowJar.archiveFile.get().getAsFile().length() <= megs * 1024 * 1024
287+
assert shadowJar.archiveFile.get().getAsFile().length() <= 29 * 1024 * 1024
291288
}
292289

293290
dependsOn "shadowJar"

dd-java-agent/cws-tls/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// This component is only included in the Java Agent if the gradle property agentIncludeCwsTls is true
2-
31
plugins {
42
id "com.github.johnrengelman.shadow"
53
}
@@ -22,5 +20,6 @@ dependencies {
2220

2321
shadowJar {
2422
dependencies deps.excludeShared
23+
// exclude this since it's available in the instrumentation jar
24+
exclude 'com/sun/jna/**/*'
2525
}
26-

0 commit comments

Comments
 (0)