Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ abstract class CallSiteInstrumentationPlugin : Plugin<Project>{
extendsFrom(project.configurations.named(mainSourceSet.compileClasspathConfigurationName).get())
}

project.tasks.named(csiSourceSet.getCompileTaskName("java"), AbstractCompile::class.java).configure {
project.tasks.named(csiSourceSet.getCompileTaskName("java"), AbstractCompile::class.java) {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ excludedClassesCoverage += ['com.datadog.profiling.controller.jfr.JdkTypeIDs']

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

tasks.named("compileTestJava").configure {
tasks.named("compileTestJava") {
setJavaVersion(it, 11)
// tests should be compiled in Java 8 compatible way
sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
2 changes: 1 addition & 1 deletion dd-java-agent/benchmark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jmh {
jmhVersion = libs.versions.jmh.get()
}

tasks.named('jmh').configure {
tasks.named('jmh') {
dependsOn ':dd-java-agent:shadowJar'
}

Expand Down
6 changes: 3 additions & 3 deletions dd-java-agent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def includeShadowJar(TaskProvider<ShadowJar> shadowJarTask, String jarname) {
}
}

project.tasks.named("processResources").configure {
project.tasks.named("processResources") {
dependsOn shadowJarTask
}
shadowJarTask.configure generalShadowJarConfig
Expand Down Expand Up @@ -344,7 +344,7 @@ tasks.withType(Test).configureEach {
dependsOn "shadowJar"
}

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

tasks.named('check').configure {
tasks.named('check') {
dependsOn 'checkAgentJarSize'
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply from: "$rootDir/gradle/test-with-scala.gradle"
addTestSuite('akka23Test')
addTestSuiteForDir('latestDepTest', 'test')

tasks.named("compileAkka23TestGroovy").configure {
tasks.named("compileAkka23TestGroovy") {
classpath += files(sourceSets.akka23Test.scala.classesDirectory)
}

Expand All @@ -41,7 +41,7 @@ sourceSets {
}
}
}
tasks.named("compileLatestDepTestGroovy").configure {
tasks.named("compileLatestDepTestGroovy") {
classpath += files(sourceSets.latestDepTest.scala.classesDirectory)
}

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


// Run 2.3 tests along with the rest of unit tests
tasks.named("test").configure {
tasks.named("test") {
dependsOn "akka23Test"
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ dependencies {
latestDepTestImplementation group: 'com.amazonaws', name: 'aws-java-sdk-dynamodb', version: '+'
}

tasks.named("test").configure {
tasks.named("test") {
dependsOn "test_before_1_11_106"
}

tasks.named("forkedTest").configure {
tasks.named("forkedTest") {
dependsOn "test_before_1_11_106ForkedTest"
}
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ if (project.gradle.startParameter.taskNames.any { it.endsWith("generateMuzzleRep
}


tasks.named('shadowJar').configure {
tasks.named('shadowJar') {
duplicatesStrategy = DuplicatesStrategy.FAIL
dependencies {
// the tracer is now in a separate shadow jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
latestDepTestImplementation group: 'io.netty', name: 'netty-transport', version: '+'
}

tasks.named("latestDepTest").configure {
tasks.named("latestDepTest") {
dependsOn "latestDep4Test"
}

Expand Down
6 changes: 3 additions & 3 deletions dd-java-agent/instrumentation/finatra-2.9/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ dependencies {
latestDepTestImplementation group: 'com.twitter', name: 'finatra-http_2.11', version: '+'
}

tasks.named("compileLatestDepTestGroovy").configure {
tasks.named("compileLatestDepTestGroovy") {
classpath = classpath.plus(files(compileLatestDepTestScala.destinationDirectory))
dependsOn "compileLatestDepTestScala"
}

tasks.named("compileLatestPre207TestGroovy").configure {
tasks.named("compileLatestPre207TestGroovy") {
classpath = classpath.plus(files(compileLatestPre207TestScala.destinationDirectory))
dependsOn "compileLatestPre207TestScala"
}

tasks.named("latestDepTest").configure {
tasks.named("latestDepTest") {
finalizedBy latestPre207Test
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ apply from: "$rootDir/gradle/java.gradle"
addTestSuiteForDir('latestDepTest', 'test')
addTestSuiteExtendingForDir('latestDepJava11Test', 'latestDepTest', 'test')

tasks.named("compileLatestDepJava11TestJava").configure {
tasks.named("compileLatestDepJava11TestJava") {
setJavaVersion(it, 11)
}
tasks.named("compileLatestDepJava11TestGroovy").configure {
tasks.named("compileLatestDepJava11TestGroovy") {
javaLauncher = getJavaLauncherFor(11)
}
tasks.named("latestDepJava11Test").configure {
tasks.named("latestDepJava11Test") {
javaLauncher = getJavaLauncherFor(11)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ previewTest.configure {
jvmArgs = ['--enable-preview']
}
// Require the preview test suite to run as part of module check
tasks.named("check").configure {
tasks.named("check") {
dependsOn "previewTest"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ apply from: "$rootDir/gradle/java.gradle"
apply plugin: "idea"


tasks.named("compileMain_java11Java").configure {
tasks.named("compileMain_java11Java") {
it.sourceCompatibility = JavaVersion.VERSION_11
it.targetCompatibility = JavaVersion.VERSION_11
setJavaVersion(it, 11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies {
latestDepTestImplementation group: 'org.jboss.resteasy', name: 'resteasy-jaxrs', version: '+'
}

tasks.named("test").configure {
tasks.named("test") {
dependsOn "resteasy31Test"
dependsOn "nestedTest"
}
4 changes: 2 additions & 2 deletions dd-java-agent/instrumentation/jdbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ dependencies {
latestDepJava11TestImplementation group: 'com.zaxxer', name: 'HikariCP', version: '+'
}

tasks.named("check").configure {
tasks.named("check") {
dependsOn "oldH2Test"
dependsOn "oldPostgresTest"
}

tasks.named("latestDepJava11Test").configure {
tasks.named("latestDepJava11Test") {
javaLauncher = getJavaLauncherFor(11)
}

Expand Down
4 changes: 2 additions & 2 deletions dd-java-agent/instrumentation/jdbc/scalikejdbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ apply plugin: 'scala'

addTestSuiteForDir('latestDepTest', 'test')

tasks.named("compileTestGroovy").configure {
tasks.named("compileTestGroovy") {
dependsOn "compileTestScala"
classpath += files(compileTestScala.destinationDirectory)
}

tasks.named("compileLatestDepTestGroovy").configure {
tasks.named("compileLatestDepTestGroovy") {
dependsOn "compileLatestDepTestScala"
classpath += files(compileLatestDepTestScala.destinationDirectory)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ instrument {
]
}

tasks['compileMain_jetty10Java'].configure {
tasks.named("compileMain_jetty10Java") {
setJavaVersion(it, 11)
}

Expand All @@ -114,10 +114,10 @@ addTestSuiteForDir('jetty94ForkedTest', 'test')
addTestSuiteForDir('latestDepJetty9ForkedTest', 'test')
addTestSuiteForDir('latestDepForkedTest', 'test')

tasks.named("latestDepForkedTest").configure {
tasks.named("latestDepForkedTest") {
javaLauncher = getJavaLauncherFor(11)
}
tasks.named("compileLatestDepForkedTestGroovy").configure {
tasks.named("compileLatestDepForkedTestGroovy") {
setJavaVersion(it, 11)
}

Expand Down
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/junit-4.10/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ muzzle {

addTestSuiteForDir('latestDepTest', 'test')

tasks.named("compileLatestDepTestGroovy").configure {
tasks.named("compileLatestDepTestGroovy") {
classpath += files(compileLatestDepTestKotlin.destinationDirectory)
}

Expand Down
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/junit-5.3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ configurations.matching({ it.name.startsWith('test') }).each({
}
})

tasks.named("compileLatestDepTestJava").configure {
tasks.named("compileLatestDepTestJava") {
setJavaVersion(it, 17)
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ configurations.matching({ it.name.startsWith('test') }).each({
}
})

tasks.named("compileLatestDepTestJava").configure {
tasks.named("compileLatestDepTestJava") {
setJavaVersion(it, 17)
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand Down
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/karate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ sourceSets {
}
}

tasks.named("compileLatestDepTestJava").configure {
tasks.named("compileLatestDepTestJava") {
setJavaVersion(it, 11)
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ apply from: "$rootDir/gradle/test-with-kotlin.gradle"

addTestSuite('latestDepTest')

tasks.named("compileTestFixturesGroovy").configure {
tasks.named("compileTestFixturesGroovy") {
classpath += files(compileTestFixturesKotlin.destinationDirectory)
}

tasks.named("compileTestGroovy").configure {
tasks.named("compileTestGroovy") {
classpath += files(compileTestKotlin.destinationDirectory)
}

tasks.named("compileLatestDepTestGroovy").configure {
tasks.named("compileLatestDepTestGroovy") {
classpath += files(compileLatestDepTestKotlin.destinationDirectory)
}

Expand Down
8 changes: 4 additions & 4 deletions dd-java-agent/instrumentation/mule-4.5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,20 @@ forbiddenApisMain_java11 {
failOnMissingClasses = false
}

tasks.named("compileTestGroovy").configure {
tasks.named("compileTestGroovy") {
dependsOn 'mvnPackage', 'extractMuleServices'
}

tasks.named("compileMule46ForkedTestGroovy").configure {
tasks.named("compileMule46ForkedTestGroovy") {
dependsOn 'mvnPackage', 'extractMule46Services'
}

tasks.named("compileLatestDepForkedTestGroovy").configure {
tasks.named("compileLatestDepForkedTestGroovy") {
dependsOn 'mvnPackage', 'extractLatestMuleServices'
setJavaVersion(it, 17)
}

tasks.named("compileLatestDepForkedTestJava").configure {
tasks.named("compileLatestDepForkedTestJava") {
setJavaVersion(it, 17)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ dependencies {
latestDepTestImplementation group: 'io.netty', name: 'netty-buffer', version: '+'
}

tasks.named("latestDepTest").configure {
tasks.named("latestDepTest") {
dependsOn "latestDep4Test"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {
latestDepTestImplementation group: 'io.netty', name: 'netty-common', version: '+'
}

tasks.named("latestDepTest").configure {
tasks.named("latestDepTest") {
dependsOn "latestDep4Test"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ dependencies {
latestDepTestImplementation group: 'io.netty', name: 'netty-common', version: '+'
}

tasks.named("latestDepTest").configure {
tasks.named("latestDepTest") {
dependsOn "latestDep4Test"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ apply from: "$rootDir/gradle/test-with-scala.gradle"

addTestSuiteForDir('latestDepTest', 'test')

tasks.named("compileLatestDepTestGroovy").configure {
tasks.named("compileLatestDepTestGroovy") {
classpath += files(sourceSets.latestDepTest.scala.classesDirectory)
}

Expand Down
4 changes: 2 additions & 2 deletions dd-java-agent/instrumentation/pekko-http-1.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ latestDepIastTest {
}
}

tasks.named("test").configure {
tasks.named("test") {
dependsOn "baseTest"
dependsOn "iastTest"
}

tasks.named('latestDepTest').configure {
tasks.named('latestDepTest') {
dependsOn "latestDepIastTest"
}

Expand Down
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/play/play-2.6/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ configurations.matching({ it.name.startsWith('latestDepTest') }).each({
force group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.5'
}
})
tasks.named("compileLatestDepTestJava").configure {
tasks.named("compileLatestDepTestJava") {
it.sourceCompatibility = JavaVersion.VERSION_11
it.targetCompatibility = JavaVersion.VERSION_11
setJavaVersion(it, 11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ tasks.withType(Test).configureEach {
usesService(testcontainersLimit)
}

tasks.named("latestDepTest").configure {
tasks.named("latestDepTest") {
finalizedBy latestReactorTest
}
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/restlet-2.2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repositories {
addTestSuiteForDir('baseForkedTest', 'baseTest')
addTestSuite('latestDepTest')

tasks.named("test").configure {
tasks.named("test") {
dependsOn "baseForkedTest"
}

Expand Down
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/rmi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ def rmic = tasks.register('rmic', Exec) {
)
}

tasks.named("test").configure {
tasks.named("test") {
dependsOn rmic
}
Loading
Loading