Skip to content

Commit 5b73524

Browse files
Refactored Groovy compiler config. Disabled module :dd-smoke-tests:springboot-openliberty-20 - it is failing on CI.
1 parent 7c04a1c commit 5b73524

File tree

12 files changed

+24
-54
lines changed

12 files changed

+24
-54
lines changed

dd-java-agent/instrumentation/aerospike-4.0/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,4 @@ tasks.withType(Test).configureEach {
3232
usesService(testcontainersLimit)
3333
}
3434

35-
["compileLatestDepTestGroovy", "compileLatestDepForkedTestGroovy"].each { name ->
36-
tasks.named(name, GroovyCompile) {
37-
configureCompiler(it, 21)
38-
}
39-
}
35+
configureGroovyCompiler(21, "compileLatestDepTestGroovy", "compileLatestDepForkedTestGroovy")

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ addTestSuiteForDir("jetty11Test", "test/jetty11")
2525
addTestSuiteExtendingForDir("jetty9LatestDepTest", "latestDepTest", "test/jetty9")
2626
addTestSuiteExtendingForDir("jetty11LatestDepTest", "latestDepTest", "test/jetty11")
2727

28-
["compileJetty11TestGroovy", "compileJetty11LatestDepTestGroovy"].each { name ->
29-
tasks.named(name, GroovyCompile) {
30-
configureCompiler(it, 11)
31-
}
32-
}
28+
configureGroovyCompiler(11, "compileJetty11TestGroovy", "compileJetty11LatestDepTestGroovy")
3329

3430
["jetty11Test", "jetty11LatestDepTest"].each { name ->
3531
tasks.named(name, Test) {

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ configurations.configureEach {
2323
}
2424
}
2525

26-
["compileLatestDepForkedTestGroovy", "compileLatestDepTestGroovy"].each {
27-
tasks.named(it, GroovyCompile) {
28-
configureCompiler(it, 11)
29-
}
30-
}
26+
configureGroovyCompiler(11, "compileLatestDepForkedTestGroovy", "compileLatestDepTestGroovy")
3127

3228
["compileLatestDepForkedTestJava", "compileLatestDepTestJava"].each {
3329
tasks.named(it, JavaCompile) {

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,13 @@ tasks.named("compileLatestDepTestJava", JavaCompile) {
3131
configureCompiler(it, 17, JavaVersion.VERSION_1_8)
3232
}
3333

34-
tasks.named("compileLatestDepTestGroovy", GroovyCompile) {
35-
configureCompiler(it, 17)
36-
}
34+
configureGroovyCompiler(17, "compileLatestDepTestGroovy")
3735

3836
tasks.named("latestDepTest", Test) {
3937
javaLauncher = getJavaLauncherFor(17)
4038
}
4139

42-
tasks.named("compileCxf3LatestDepTestGroovy", GroovyCompile) {
43-
configureCompiler(it, 11)
44-
}
40+
configureGroovyCompiler(11, "compileCxf3LatestDepTestGroovy")
4541

4642
tasks.named("cxf3LatestDepTest", Test) {
4743
javaLauncher = getJavaLauncherFor(11)

dd-java-agent/instrumentation/jetty/jetty-client/jetty-client-10.0/build.gradle

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,12 @@ tasks.named("compileMain_java11Java", JavaCompile) {
3131
configureCompiler(it, 11, JavaVersion.VERSION_1_8)
3232
}
3333

34-
[
34+
configureGroovyCompiler(11,
3535
"compileTestGroovy",
3636
"compileJetty11TestGroovy",
3737
"compileLatestDepTestGroovy",
3838
"compileJetty10LatestDepTestGroovy"
39-
].each { taskName ->
40-
tasks.named(taskName, GroovyCompile) {
41-
configureCompiler(it, 11)
42-
}
43-
}
39+
)
4440

4541
dependencies {
4642
main_java11CompileOnly group: 'org.eclipse.jetty', name: 'jetty-client', version: '10.0.0'

dd-java-agent/instrumentation/jetty/jetty-client/jetty-client-12.0/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ tasks.named("compileMain_java17Java", JavaCompile) {
1919
configureCompiler(it, 17, JavaVersion.VERSION_17)
2020
}
2121

22-
["compileTestGroovy", "compileLatestDepTestGroovy"].each {taskName ->
23-
tasks.named(taskName, GroovyCompile) {
24-
configureCompiler(it, 17)
25-
}
26-
}
22+
configureGroovyCompiler(17, "compileTestGroovy", "compileLatestDepTestGroovy")
2723

2824
configurations.matching { it.name.startsWith('test') || it.name.startsWith('latestDepTest') }.configureEach {
2925
it.resolutionStrategy {

dd-java-agent/instrumentation/junit/junit-5.3/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,4 @@ tasks.named("compileLatestDepTestJava", JavaCompile) {
6767
configureCompiler(it, 17, JavaVersion.VERSION_1_8)
6868
}
6969

70-
tasks.named("compileLatestDepTestGroovy", GroovyCompile) {
71-
configureCompiler(it, 17, JavaVersion.VERSION_1_8)
72-
}
73-
70+
configureGroovyCompiler(17, "compileLatestDepTestGroovy")

dd-java-agent/instrumentation/junit/junit-5.3/junit-5.8/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,4 @@ tasks.named("compileLatestDepTestJava", JavaCompile) {
6161
configureCompiler(it, 17, JavaVersion.VERSION_1_8)
6262
}
6363

64-
tasks.named("compileLatestDepTestGroovy", GroovyCompile) {
65-
configureCompiler(it, 17)
66-
}
67-
64+
configureGroovyCompiler(17, "compileLatestDepTestGroovy")

dd-java-agent/instrumentation/spring/spring-boot-1.3/build.gradle

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,12 @@ addTestSuiteExtendingForDir("boot2LatestDepForkedTest", "boot2LatestDepTest", "t
3131
addTestSuiteExtendingForDir("boot3ForkedTest", "boot3Test", "test")
3232
addTestSuiteExtendingForDir("latestDepForkedTest", "latestDepTest", "test")
3333

34-
[
34+
configureGroovyCompiler(17,
3535
"compileLatestDepTestGroovy",
3636
"compileLatestDepForkedTestGroovy",
3737
"compileBoot3TestGroovy",
3838
"compileBoot3ForkedTestGroovy"
39-
].each { name ->
40-
tasks.named(name, GroovyCompile) {
41-
configureCompiler(it, 17)
42-
}
43-
}
39+
)
4440

4541
dependencies {
4642
implementation project(':dd-java-agent:instrumentation:span-origin')

dd-java-agent/instrumentation/undertow/undertow-2.2/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,4 @@ dependencies {
4949
}
5050
}
5151

52-
["compileLatestDepTestGroovy", "compileLatestDepForkedTestGroovy"].each {taskName ->
53-
tasks.named(taskName, GroovyCompile) {
54-
configureCompiler(it, 11)
55-
}
56-
}
52+
configureGroovyCompiler(11, "compileLatestDepTestGroovy", "compileLatestDepForkedTestGroovy")

0 commit comments

Comments
 (0)