Skip to content

Commit b09dcc5

Browse files
authored
Remove extra .configure method (#9609)
* First batch * Second batch * Third batch
1 parent 9ac9a56 commit b09dcc5

80 files changed

Lines changed: 121 additions & 120 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

buildSrc/src/main/kotlin/datadog/gradle/plugin/CallSiteInstrumentationPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ abstract class CallSiteInstrumentationPlugin : Plugin<Project>{
9898
extendsFrom(project.configurations.named(mainSourceSet.compileClasspathConfigurationName).get())
9999
}
100100

101-
project.tasks.named(csiSourceSet.getCompileTaskName("java"), AbstractCompile::class.java).configure {
101+
project.tasks.named(csiSourceSet.getCompileTaskName("java"), AbstractCompile::class.java) {
102102
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
103103
targetCompatibility = JavaVersion.VERSION_1_8.toString()
104104
}

dd-java-agent/agent-profiling/profiling-controller-jfr/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ excludedClassesCoverage += ['com.datadog.profiling.controller.jfr.JdkTypeIDs']
3232

3333
// Shared JFR implementation. The earliest Java version JFR is working on is Java 8
3434

35-
tasks.named("compileTestJava").configure {
35+
tasks.named("compileTestJava") {
3636
setJavaVersion(it, 11)
3737
// tests should be compiled in Java 8 compatible way
3838
sourceCompatibility = JavaVersion.VERSION_1_8

dd-java-agent/benchmark/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jmh {
3838
jmhVersion = libs.versions.jmh.get()
3939
}
4040

41-
tasks.named('jmh').configure {
41+
tasks.named('jmh') {
4242
dependsOn ':dd-java-agent:shadowJar'
4343
}
4444

dd-java-agent/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def includeShadowJar(TaskProvider<ShadowJar> shadowJarTask, String jarname) {
147147
}
148148
}
149149

150-
project.tasks.named("processResources").configure {
150+
project.tasks.named("processResources") {
151151
dependsOn shadowJarTask
152152
}
153153
shadowJarTask.configure generalShadowJarConfig
@@ -344,7 +344,7 @@ tasks.withType(Test).configureEach {
344344
dependsOn "shadowJar"
345345
}
346346

347-
tasks.register('checkAgentJarSize').configure {
347+
tasks.register('checkAgentJarSize') {
348348
doLast {
349349
// Arbitrary limit to prevent unintentional increases to the agent jar size
350350
// Raise or lower as required
@@ -354,6 +354,6 @@ tasks.register('checkAgentJarSize').configure {
354354
dependsOn "shadowJar"
355355
}
356356

357-
tasks.named('check').configure {
357+
tasks.named('check') {
358358
dependsOn 'checkAgentJarSize'
359359
}

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

Lines changed: 3 additions & 3 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").configure {
21+
tasks.named("compileAkka23TestGroovy") {
2222
classpath += files(sourceSets.akka23Test.scala.classesDirectory)
2323
}
2424

@@ -41,7 +41,7 @@ sourceSets {
4141
}
4242
}
4343
}
44-
tasks.named("compileLatestDepTestGroovy").configure {
44+
tasks.named("compileLatestDepTestGroovy") {
4545
classpath += files(sourceSets.latestDepTest.scala.classesDirectory)
4646
}
4747

@@ -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").configure {
71+
tasks.named("test") {
7272
dependsOn "akka23Test"
7373
}

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").configure {
106+
tasks.named("test") {
107107
dependsOn "test_before_1_11_106"
108108
}
109109

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

dd-java-agent/instrumentation/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ if (project.gradle.startParameter.taskNames.any { it.endsWith("generateMuzzleRep
128128
}
129129

130130

131-
tasks.named('shadowJar').configure {
131+
tasks.named('shadowJar') {
132132
duplicatesStrategy = DuplicatesStrategy.FAIL
133133
dependencies {
134134
// the tracer is now in a separate shadow jar

dd-java-agent/instrumentation/enable-wallclock-profiling/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies {
3131
latestDepTestImplementation group: 'io.netty', name: 'netty-transport', version: '+'
3232
}
3333

34-
tasks.named("latestDepTest").configure {
34+
tasks.named("latestDepTest") {
3535
dependsOn "latestDep4Test"
3636
}
3737

dd-java-agent/instrumentation/finatra-2.9/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ dependencies {
3535
latestDepTestImplementation group: 'com.twitter', name: 'finatra-http_2.11', version: '+'
3636
}
3737

38-
tasks.named("compileLatestDepTestGroovy").configure {
38+
tasks.named("compileLatestDepTestGroovy") {
3939
classpath = classpath.plus(files(compileLatestDepTestScala.destinationDirectory))
4040
dependsOn "compileLatestDepTestScala"
4141
}
4242

43-
tasks.named("compileLatestPre207TestGroovy").configure {
43+
tasks.named("compileLatestPre207TestGroovy") {
4444
classpath = classpath.plus(files(compileLatestPre207TestScala.destinationDirectory))
4545
dependsOn "compileLatestPre207TestScala"
4646
}
4747

48-
tasks.named("latestDepTest").configure {
48+
tasks.named("latestDepTest") {
4949
finalizedBy latestPre207Test
5050
}

dd-java-agent/instrumentation/jakarta-rs-annotations-3/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ apply from: "$rootDir/gradle/java.gradle"
1212
addTestSuiteForDir('latestDepTest', 'test')
1313
addTestSuiteExtendingForDir('latestDepJava11Test', 'latestDepTest', 'test')
1414

15-
tasks.named("compileLatestDepJava11TestJava").configure {
15+
tasks.named("compileLatestDepJava11TestJava") {
1616
setJavaVersion(it, 11)
1717
}
18-
tasks.named("compileLatestDepJava11TestGroovy").configure {
18+
tasks.named("compileLatestDepJava11TestGroovy") {
1919
javaLauncher = getJavaLauncherFor(11)
2020
}
21-
tasks.named("latestDepJava11Test").configure {
21+
tasks.named("latestDepJava11Test") {
2222
javaLauncher = getJavaLauncherFor(11)
2323
}
2424

0 commit comments

Comments
 (0)