File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
src/main/java/datadog/trace/bootstrap Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 11plugins {
22 `java- library`
3+ id(" com.gradleup.shadow" )
34}
45
56apply (from = " $rootDir /gradle/java.gradle" )
67
8+ /*
9+ * Add an addition gradle configuration to be consumed by bootstrap only.
10+ */
11+ tasks.shadowJar {
12+ relocate(" datadog.environment" , " bootstrap.environment" )
13+ }
14+
15+ /*
16+ * Configure test coverage.
17+ */
718extra.set(" minimumInstructionCoverage" , 0.7 )
819val excludedClassesCoverage by extra {
920 listOf (
Original file line number Diff line number Diff line change @@ -241,7 +241,8 @@ tasks.withType(GenerateMavenPom).configureEach { task ->
241241dependencies {
242242 implementation project(path : ' :components:json' )
243243 implementation project(path : ' :components:cli' )
244- implementation project(path : ' :components:environment' )
244+ // Depend on the bootstrap-specific shadow configuration to avoid having the same component reused by both bootstrap and agent
245+ implementation project(path : ' :components:environment' , configuration : ' shadow' )
245246 modules {
246247 module(" com.squareup.okio:okio" ) {
247248 replacedBy(" com.datadoghq.okio:okio" ) // embed our patched fork
@@ -261,6 +262,7 @@ dependencies {
261262 testImplementation group : ' io.opentracing' , name : ' opentracing-util' , version : ' 0.31.0'
262263
263264 // Includes for the top level shadow jar
265+ shadowInclude project(path : ' :components:environment' , configuration : ' shadow' )
264266 shadowInclude project(path : ' :dd-java-agent:agent-bootstrap' )
265267 shadowInclude project(path : ' :dd-java-agent:agent-debugger:debugger-bootstrap' )
266268 shadowInclude project(path : ' :dd-java-agent:agent-otel:otel-bootstrap' , configuration : ' shadow' )
Original file line number Diff line number Diff line change 33import static datadog .trace .bootstrap .SystemUtils .getPropertyOrEnvVar ;
44import static java .nio .charset .StandardCharsets .UTF_8 ;
55
6+ import bootstrap .environment .SystemProperties ;
67import datadog .cli .CLIHelper ;
7- import datadog .environment .SystemProperties ;
88import de .thetaphi .forbiddenapis .SuppressForbidden ;
99import java .io .BufferedReader ;
1010import java .io .File ;
You can’t perform that action at this time.
0 commit comments