Skip to content

Commit c2b5b10

Browse files
committed
Update instrumentations A-C
1 parent a081948 commit c2b5b10

File tree

9 files changed

+78
-58
lines changed

9 files changed

+78
-58
lines changed

dd-java-agent/instrumentation/akka/akka-actor-2.5/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ apply from: "$rootDir/gradle/test-with-scala.gradle"
1818
addTestSuite('akka23Test')
1919
addTestSuiteForDir('latestDepTest', 'test')
2020

21-
tasks.named("compileAkka23TestGroovy") {
21+
tasks.named("compileAkka23TestGroovy", GroovyCompile) {
2222
classpath += files(sourceSets.akka23Test.scala.classesDirectory)
2323
}
2424

@@ -68,6 +68,6 @@ configurations.matching({ it.name.startsWith('akka23') }).each({
6868

6969

7070
// Run 2.3 tests along with the rest of unit tests
71-
tasks.named("test") {
71+
tasks.named("test", Test) {
7272
dependsOn "akka23Test"
7373
}

dd-java-agent/instrumentation/akka/akka-http/akka-http-10.0/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ addTestSuiteForDir 'version101IastTest', 'iastTest'
2222
addTestSuiteForDir 'version102IastTest', 'iastTest'
2323
addTestSuiteForDir 'latestDepIastTest', 'iastTest'
2424

25-
compileLagomTestJava {
25+
tasks.named("compileLagomTestJava", JavaCompile) {
2626
sourceCompatibility = JavaVersion.VERSION_1_8
2727
targetCompatibility = JavaVersion.VERSION_1_8
2828
}
2929

30-
compileLagomTestGroovy {
30+
tasks.named("compileLagomTestGroovy", GroovyCompile) {
3131
sourceCompatibility = JavaVersion.VERSION_1_8
3232
targetCompatibility = JavaVersion.VERSION_1_8
3333
}
@@ -170,32 +170,32 @@ dependencies {
170170
lagomTestImplementation group: 'com.lightbend.lagom', name: 'lagom-javadsl-testkit_2.11', version: '1.4.0'
171171
}
172172

173-
compileBaseTestGroovy {
173+
tasks.named("compileBaseTestGroovy", GroovyCompile) {
174174
classpath = classpath.plus(files(compileBaseTestScala.destinationDirectory))
175175
dependsOn "compileBaseTestScala"
176176
}
177177

178-
compileBaseForkedTestGroovy {
178+
tasks.named("compileBaseForkedTestGroovy", GroovyCompile) {
179179
classpath = classpath.plus(files(compileBaseTestScala.destinationDirectory))
180180
dependsOn "compileBaseTestScala"
181181
}
182182

183-
compileVersion101TestGroovy {
183+
tasks.named("compileVersion101TestGroovy", GroovyCompile) {
184184
classpath = classpath.plus(files(compileVersion101TestScala.destinationDirectory))
185185
dependsOn "compileVersion101TestScala"
186186
}
187187

188-
compileVersion101ForkedTestGroovy {
188+
tasks.named("compileVersion101ForkedTestGroovy", GroovyCompile) {
189189
classpath = classpath.plus(files(compileVersion101TestScala.destinationDirectory))
190190
dependsOn "compileVersion101TestScala"
191191
}
192192

193-
compileVersion102Scala213TestGroovy {
193+
tasks.named("compileVersion102Scala213TestGroovy", GroovyCompile) {
194194
classpath = classpath.plus(files(compileVersion102Scala213TestScala.destinationDirectory))
195195
dependsOn "compileVersion102Scala213TestScala"
196196
}
197197

198-
compileLatestDepTestGroovy {
198+
tasks.named("compileLatestDepTestGroovy", GroovyCompile) {
199199
classpath = classpath.plus(files(compileLatestDepTestScala.destinationDirectory))
200200
dependsOn "compileLatestDepTestScala"
201201
}

dd-java-agent/instrumentation/akka/akka-http/akka-http-10.6/build.gradle

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,31 @@ repositories {
4141

4242
addTestSuiteForDir('latestDepTest', 'test')
4343

44-
[compileMain_java11Java, compileTestScala, compileLatestDepTestScala].each {
45-
it.configure {
46-
setJavaVersion(it, 11)
47-
sourceCompatibility = JavaVersion.VERSION_1_8
48-
targetCompatibility = JavaVersion.VERSION_1_8
49-
}
44+
tasks.named("compileMain_java11Java", JavaCompile) {
45+
setJavaVersion(it, 11)
46+
sourceCompatibility = JavaVersion.VERSION_1_8
47+
targetCompatibility = JavaVersion.VERSION_1_8
48+
}
49+
50+
tasks.named("compileTestScala", ScalaCompile) {
51+
setJavaVersion(it, 11)
52+
sourceCompatibility = JavaVersion.VERSION_1_8
53+
targetCompatibility = JavaVersion.VERSION_1_8
54+
}
55+
56+
tasks.named("compileLatestDepTestScala", ScalaCompile) {
57+
setJavaVersion(it, 11)
58+
sourceCompatibility = JavaVersion.VERSION_1_8
59+
targetCompatibility = JavaVersion.VERSION_1_8
5060
}
5161

52-
compileTestGroovy {
62+
tasks.named("compileTestGroovy", GroovyCompile) {
5363
javaLauncher = getJavaLauncherFor(11)
5464
dependsOn compileTestScala
5565
classpath += files(compileTestScala.destinationDirectory)
5666
}
5767

58-
compileLatestDepTestGroovy {
68+
tasks.named("compileLatestDepTestGroovy", GroovyCompile) {
5969
javaLauncher = getJavaLauncherFor(11)
6070
dependsOn compileLatestDepTestScala
6171
classpath += files(compileLatestDepTestScala.destinationDirectory)

dd-java-agent/instrumentation/armeria/armeria-grpc-0.84/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ addTestSuiteExtendingForDir('latestDepForkedTest', 'latestDepTest', 'test')
4242

4343
apply from: "$rootDir/gradle/configure_tests.gradle"
4444

45-
latestDepTest {
45+
tasks.named("latestDepTest", Test) {
4646
finalizedBy 'latestDepForkedTest'
4747
}
4848

dd-java-agent/instrumentation/armeria/armeria-jetty-1.24/build.gradle

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,18 @@ addTestSuiteForDir("jetty11Test", "test/jetty11")
2525
addTestSuiteExtendingForDir("jetty9LatestDepTest", "latestDepTest", "test/jetty9")
2626
addTestSuiteExtendingForDir("jetty11LatestDepTest", "latestDepTest", "test/jetty11")
2727

28-
[compileJetty11TestGroovy, jetty11Test, compileJetty11LatestDepTestGroovy, jetty11LatestDepTest].each {
29-
it.configure {
30-
javaLauncher = getJavaLauncherFor(11)
31-
}
28+
tasks.named("compileJetty11TestGroovy", GroovyCompile) {
29+
javaLauncher = getJavaLauncherFor(11)
30+
}
31+
tasks.named("compileJetty11LatestDepTestGroovy", GroovyCompile) {
32+
javaLauncher = getJavaLauncherFor(11)
33+
}
34+
35+
tasks.named("jetty11Test", Test) {
36+
javaLauncher = getJavaLauncherFor(11)
37+
}
38+
tasks.named("jetty11LatestDepTest", Test) {
39+
javaLauncher = getJavaLauncherFor(11)
3240
}
3341

3442
dependencies {
@@ -86,6 +94,4 @@ dependencies {
8694
testRuntimeOnly project(':dd-java-agent:instrumentation:jetty:jetty-appsec:jetty-appsec-9.3')
8795
testRuntimeOnly project(':dd-java-agent:instrumentation:servlet:request-5')
8896
testRuntimeOnly project(':dd-java-agent:instrumentation:servlet:request-3')
89-
90-
9197
}

dd-java-agent/instrumentation/aws-java/aws-java-lambda-handler-1.2/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ apply from: "$rootDir/gradle/java.gradle"
1010

1111
addTestSuiteForDir('latestDepTest', 'test')
1212

13-
test {
13+
tasks.named("test", Test) {
1414
environment "_HANDLER", "Handler"
1515
}
1616

17-
forkedTest {
17+
tasks.named("forkedTest", Test) {
1818
environment "_HANDLER", "Handler"
1919
}
2020

21-
latestDepTest {
21+
tasks.named("latestDepTest", Test) {
2222
environment "_HANDLER", "Handler"
2323
}
2424

dd-java-agent/instrumentation/aws-java/aws-java-sdk-1.11/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ dependencies {
103103
latestDepTestImplementation group: 'com.amazonaws', name: 'aws-java-sdk-dynamodb', version: '+'
104104
}
105105

106-
tasks.named("test") {
106+
tasks.named("test", Test) {
107107
dependsOn "test_before_1_11_106"
108108
}
109109

110-
tasks.named("forkedTest") {
110+
tasks.named("forkedTest", Test) {
111111
dependsOn "test_before_1_11_106ForkedTest"
112112
}

dd-java-agent/instrumentation/axis2-1.3/build.gradle

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,20 @@ configurations.configureEach {
2323
}
2424
}
2525

26-
[compileLatestDepForkedTestGroovy, compileLatestDepTestGroovy].each {
27-
it.configure {
28-
javaLauncher = getJavaLauncherFor(11)
29-
}
26+
tasks.named("compileLatestDepForkedTestGroovy", GroovyCompile) {
27+
javaLauncher = getJavaLauncherFor(11)
3028
}
3129

32-
[compileLatestDepForkedTestJava, compileLatestDepTestJava].each {
33-
it.configure {
34-
setJavaVersion(it, 11)
35-
}
30+
tasks.named("compileLatestDepTestGroovy", GroovyCompile) {
31+
javaLauncher = getJavaLauncherFor(11)
32+
}
33+
34+
tasks.named("compileLatestDepForkedTestJava", JavaCompile) {
35+
setJavaVersion(it, 11)
36+
}
37+
38+
tasks.named("compileLatestDepTestJava", JavaCompile) {
39+
setJavaVersion(it, 11)
3640
}
3741

3842
dependencies {

dd-java-agent/instrumentation/cxf-2.1/build.gradle

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,32 @@ apply from: "${rootDir}/gradle/java.gradle"
2323
addTestSuite('latestDepTest')
2424
addTestSuiteForDir('cxf3LatestDepTest', 'test')
2525

26-
[compileCxf3LatestDepTestJava].each {
27-
it.configure {
28-
setJavaVersion(it, 11)
29-
sourceCompatibility = JavaVersion.VERSION_1_8
30-
targetCompatibility = JavaVersion.VERSION_1_8
31-
}
26+
tasks.named("compileCxf3LatestDepTestJava", JavaCompile) {
27+
setJavaVersion(it, 11)
28+
sourceCompatibility = JavaVersion.VERSION_1_8
29+
targetCompatibility = JavaVersion.VERSION_1_8
3230
}
3331

34-
[compileLatestDepTestJava].each {
35-
it.configure {
36-
setJavaVersion(it, 17)
37-
sourceCompatibility = JavaVersion.VERSION_1_8
38-
targetCompatibility = JavaVersion.VERSION_1_8
39-
}
32+
tasks.named("compileLatestDepTestJava", JavaCompile) {
33+
setJavaVersion(it, 17)
34+
sourceCompatibility = JavaVersion.VERSION_1_8
35+
targetCompatibility = JavaVersion.VERSION_1_8
4036
}
4137

42-
[compileLatestDepTestGroovy, latestDepTest].each {
43-
it.configure {
44-
javaLauncher = getJavaLauncherFor(17)
45-
}
38+
tasks.named("compileLatestDepTestGroovy", GroovyCompile) {
39+
javaLauncher = getJavaLauncherFor(17)
4640
}
4741

48-
[compileCxf3LatestDepTestGroovy, cxf3LatestDepTest].each {
49-
it.configure {
50-
javaLauncher = getJavaLauncherFor(11)
51-
}
42+
tasks.named("latestDepTest", Test) {
43+
javaLauncher = getJavaLauncherFor(17)
44+
}
45+
46+
tasks.named("compileCxf3LatestDepTestGroovy", GroovyCompile) {
47+
javaLauncher = getJavaLauncherFor(11)
48+
}
49+
50+
tasks.named("cxf3LatestDepTest", Test) {
51+
javaLauncher = getJavaLauncherFor(11)
5252
}
5353

5454
dependencies {

0 commit comments

Comments
 (0)