Skip to content

Commit 1b5480a

Browse files
committed
fix: Use testFixture notation, instead of project's compile test fixture task output
Especially, the test fixtures of the servlet instrumentation needs to export their dependencies to :dd-java-agent:testing
1 parent dc8bc80 commit 1b5480a

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

dd-java-agent/instrumentation/liberty-20/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ dependencies {
3737
webappCompileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
3838
// compileOnly to avoid bringing all the test dependencies to the test app
3939
// these are to be provided by the system classloader on test time
40-
webappCompileOnly project(':dd-java-agent:instrumentation:servlet:request-3')
41-
.tasks['compileTestFixturesJava'].classpath
40+
webappCompileOnly testFixtures(project(':dd-java-agent:instrumentation:servlet:request-3'))
4241
// only the testFixtures jar (not its dependencies) and groovy should be included in the webapp
4342
webappImplementation files(
4443
project(':dd-java-agent:instrumentation:servlet:request-3')

dd-java-agent/instrumentation/liberty-23/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ dependencies {
4141
webappCompileOnly group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: '5.0.0'
4242
// compileOnly to avoid bringing all the test dependencies to the test app
4343
// these are to be provided by the system classloader on test time
44-
webappCompileOnly project(':dd-java-agent:instrumentation:servlet:request-5')
45-
.tasks['compileTestFixturesJava'].classpath
44+
webappCompileOnly testFixtures(project(':dd-java-agent:instrumentation:servlet:request-5'))
4645
// only the testFixtures jar (not its dependencies) and groovy should be included in the webapp
4746
webappImplementation files(
4847
project(':dd-java-agent:instrumentation:servlet:request-5')

dd-java-agent/instrumentation/servlet/request-3/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dependencies {
3838
compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
3939
implementation project(':dd-java-agent:instrumentation:servlet-common')
4040

41-
testFixturesImplementation(project(':dd-java-agent:testing')) {
41+
testFixturesApi(project(':dd-java-agent:testing')) {
4242
exclude group: 'org.eclipse.jetty', module: 'jetty-server'
4343
}
4444
testFixturesCompileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'

dd-java-agent/instrumentation/servlet/request-5/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ dependencies {
6464
transitive = false
6565
}
6666

67-
testFixturesImplementation(project(':dd-java-agent:testing')) {
67+
testFixturesApi(project(':dd-java-agent:testing')) {
6868
exclude group: 'org.eclipse.jetty', module: 'jetty-server'
6969
}
7070
testFixturesCompileOnly group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: '5.0.0'

0 commit comments

Comments
 (0)