File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed
src/main/java/datadog/trace/bootstrap Expand file tree Collapse file tree 3 files changed +19
-4
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+ * "datadog.trace." prefix is required to be excluded from Jacoco instrumentation.
11+ * See ConfigDefaults.DEFAULT_CIVISIBILITY_JACOCO_PLUGIN_EXCLUDES for more details.
12+ */
13+ tasks.shadowJar {
14+ relocate(" datadog.environment" , " datadog.trace.bootstrap.environment" )
15+ }
16+
17+ /*
18+ * Configure test coverage.
19+ */
720extra.set(" minimumInstructionCoverage" , 0.7 )
821val excludedClassesCoverage by extra {
922 listOf (
Original file line number Diff line number Diff line change @@ -250,7 +250,8 @@ tasks.withType(GenerateMavenPom).configureEach { task ->
250250
251251dependencies {
252252 implementation project(path : ' :components:json' )
253- implementation project(path : ' :components:environment' )
253+ // Depend on the bootstrap-specific shadow configuration to avoid having the same component reused by both bootstrap and agent
254+ implementation project(path : ' :components:environment' , configuration : ' shadow' )
254255 modules {
255256 module(" com.squareup.okio:okio" ) {
256257 replacedBy(" com.datadoghq.okio:okio" ) // embed our patched fork
@@ -270,6 +271,7 @@ dependencies {
270271 testImplementation group : ' io.opentracing' , name : ' opentracing-util' , version : ' 0.31.0'
271272
272273 // Includes for the top level shadow jar
274+ shadowInclude project(path : ' :components:environment' , configuration : ' shadow' )
273275 shadowInclude project(path : ' :dd-java-agent:agent-bootstrap' )
274276 shadowInclude project(path : ' :dd-java-agent:agent-debugger:debugger-bootstrap' )
275277 shadowInclude project(path : ' :dd-java-agent:agent-otel:otel-bootstrap' , configuration : ' shadow' )
Original file line number Diff line number Diff line change 22
33import static java .nio .charset .StandardCharsets .UTF_8 ;
44
5- import datadog .environment .EnvironmentVariables ;
6- import datadog .environment .JavaVirtualMachine ;
7- import datadog .environment .SystemProperties ;
5+ import datadog .trace . bootstrap . environment .EnvironmentVariables ;
6+ import datadog .trace . bootstrap . environment .JavaVirtualMachine ;
7+ import datadog .trace . bootstrap . 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