Skip to content
Draft
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 @@ -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") {
tasks.named("test", Test) {
dependsOn "akka23Test"
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ addTestSuiteForDir 'version101IastTest', 'iastTest'
addTestSuiteForDir 'version102IastTest', 'iastTest'
addTestSuiteForDir 'latestDepIastTest', 'iastTest'

compileLagomTestJava {
tasks.named("compileLagomTestJava", JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

compileLagomTestGroovy {
tasks.named("compileLagomTestGroovy", GroovyCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -170,32 +170,32 @@ dependencies {
lagomTestImplementation group: 'com.lightbend.lagom', name: 'lagom-javadsl-testkit_2.11', version: '1.4.0'
}

compileBaseTestGroovy {
tasks.named("compileBaseTestGroovy", GroovyCompile) {
classpath = classpath.plus(files(compileBaseTestScala.destinationDirectory))
dependsOn "compileBaseTestScala"
}

compileBaseForkedTestGroovy {
tasks.named("compileBaseForkedTestGroovy", GroovyCompile) {
classpath = classpath.plus(files(compileBaseTestScala.destinationDirectory))
dependsOn "compileBaseTestScala"
}

compileVersion101TestGroovy {
tasks.named("compileVersion101TestGroovy", GroovyCompile) {
classpath = classpath.plus(files(compileVersion101TestScala.destinationDirectory))
dependsOn "compileVersion101TestScala"
}

compileVersion101ForkedTestGroovy {
tasks.named("compileVersion101ForkedTestGroovy", GroovyCompile) {
classpath = classpath.plus(files(compileVersion101TestScala.destinationDirectory))
dependsOn "compileVersion101TestScala"
}

compileVersion102Scala213TestGroovy {
tasks.named("compileVersion102Scala213TestGroovy", GroovyCompile) {
classpath = classpath.plus(files(compileVersion102Scala213TestScala.destinationDirectory))
dependsOn "compileVersion102Scala213TestScala"
}

compileLatestDepTestGroovy {
tasks.named("compileLatestDepTestGroovy", GroovyCompile) {
classpath = classpath.plus(files(compileLatestDepTestScala.destinationDirectory))
dependsOn "compileLatestDepTestScala"
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ addTestSuiteExtendingForDir('latestDepForkedTest', 'latestDepTest', 'test')

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

latestDepTest {
tasks.named("latestDepTest", Test) {
finalizedBy 'latestDepForkedTest'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,4 @@ dependencies {
testRuntimeOnly project(':dd-java-agent:instrumentation:jetty:jetty-appsec:jetty-appsec-9.3')
testRuntimeOnly project(':dd-java-agent:instrumentation:servlet:jakarta-servlet-5.0')
testRuntimeOnly project(':dd-java-agent:instrumentation:servlet:javax-servlet:javax-servlet-3.0')


}
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ apply from: "$rootDir/gradle/java.gradle"

addTestSuiteForDir('latestDepTest', 'test')

test {
tasks.named("test", Test) {
environment "_HANDLER", "Handler"
}

forkedTest {
tasks.named("forkedTest", Test) {
environment "_HANDLER", "Handler"
}

latestDepTest {
tasks.named("latestDepTest", Test) {
environment "_HANDLER", "Handler"
}

Expand Down
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") {
tasks.named("test", Test) {
dependsOn "test_before_1_11_106"
}

tasks.named("forkedTest") {
tasks.named("forkedTest", Test) {
dependsOn "test_before_1_11_106ForkedTest"
}
4 changes: 2 additions & 2 deletions dd-java-agent/instrumentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ plugins {
apply from: "$rootDir/gradle/java.gradle"


tasks.register("latestDepTest")
tasks.register("latestDepTest", Test)

Project parent_project = project
subprojects { Project subProj ->
Expand Down Expand Up @@ -130,7 +130,7 @@ if (project.gradle.startParameter.taskNames.any { it.endsWith("generateMuzzleRep
}


tasks.named('shadowJar') {
tasks.named('shadowJar', 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") {
tasks.named("latestDepTest", Test) {
dependsOn "latestDep4Test"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ dependencies {
}
}

forbiddenApisMain_java11 {
tasks.named("forbiddenApisMain_java11") {
failOnMissingClasses = false
}

test {
tasks.named("test", Test) {
useJUnitPlatform()
}

Expand Down
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/finatra-2.9/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ tasks.named("compileLatestPre207TestGroovy", GroovyCompile) {
dependsOn "compileLatestPre207TestScala"
}

tasks.named("latestDepTest") {
tasks.named("latestDepTest", Test) {
finalizedBy latestPre207Test
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ apply plugin: "idea"

["compileMain_java11Java", "compileTestJava"].each { name ->
tasks.named(name, JavaCompile) {
it.sourceCompatibility = JavaVersion.VERSION_11
it.targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
setJavaVersion(it, 11)
it.options.compilerArgs.addAll([
options.compilerArgs.addAll([
'-Xlint:all,-processing,-options,-path',
'--add-modules',
'jdk.internal.vm.ci',
Expand All @@ -34,7 +34,7 @@ dependencies {
main_java11CompileOnly group: 'org.graalvm.nativeimage', name: 'svm', version: '20.0.0'
}

forbiddenApisMain_java11 {
tasks.named("forbiddenApisMain_java11") {
failOnMissingClasses = false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ dependencies {
compileOnly project(":dd-java-agent:instrumentation:junit:junit-4.10")
}

forbiddenApisMain {
tasks.named("forbiddenApisMain") {
failOnMissingClasses = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ dependencies {
compileOnly gradleApi()
}

forbiddenApisMain {
tasks.named("forbiddenApisMain") {
failOnMissingClasses = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ dependencies {
compileOnly gradleApi()
}

forbiddenApisMain {
tasks.named("forbiddenApisMain") {
failOnMissingClasses = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,23 @@ dependencies {
latestDepTestImplementation group: 'com.graphql-java', name: 'graphql-java', version: '22.+'

[
compileLatestDepTestJava,
compileLatestDepTestGroovy,
compileLatestDepForkedTestJava,
compileLatestDepForkedTestGroovy,
compileGraphql21LatestDepTestJava,
compileGraphql21LatestDepTestGroovy,
compileGraphql21LatestDepForkedTestJava,
compileGraphql21LatestDepForkedTestGroovy
].each {
it.configure {
"compileLatestDepTestJava",
"compileLatestDepForkedTestJava",
"compileGraphql21LatestDepTestJava",
"compileGraphql21LatestDepForkedTestJava"
].each { name ->
tasks.named(name, JavaCompile) {
setJavaVersion(it, 11)
}
}

[
"compileLatestDepTestGroovy",
"compileLatestDepForkedTestGroovy",
"compileGraphql21LatestDepTestGroovy",
"compileGraphql21LatestDepForkedTestGroovy"
].each { name ->
tasks.named(name, GroovyCompile) {
setJavaVersion(it, 11)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ apply from: "${rootDir}/gradle/tries.gradle"

addTestSuiteForDir('latestDepTest', 'test')

compileJava.dependsOn 'generateClassNameTries'
sourcesJar.dependsOn 'generateClassNameTries'
tasks.named("compileJava", JavaCompile) {
dependsOn("generateClassNameTries")
}

tasks.named("sourcesJar", Jar) {
dependsOn("generateClassNameTries")
}

dependencies {
testImplementation project(':dd-java-agent:agent-tooling')
Expand Down
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/jakarta-jms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repositories {
}
}

compileTestGroovy {
tasks.named("compileTestGroovy", GroovyCompile) {
it.javaLauncher = getJavaLauncherFor(17)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ addTestSuiteExtendingForDir('latestDepJava11Test', 'latestDepTest', 'test')
tasks.named("compileLatestDepJava11TestJava", JavaCompile) {
setJavaVersion(it, 11)
}

tasks.named("compileLatestDepJava11TestGroovy", GroovyCompile) {
javaLauncher = getJavaLauncherFor(11)
}
tasks.named("latestDepJava11Test") {

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ext {
}
apply from: "${rootDir}/gradle/java.gradle"

compileJava {
tasks.named("compileJava", JavaCompile) {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(8)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ idea {
*/
addTestSuite('previewTest')
// Configure groovy test file compilation
compilePreviewTestGroovy.configure {
tasks.named("compilePreviewTestGroovy", GroovyCompile) {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(21)
}
options.compilerArgs.add("--enable-preview")
}
// Configure Java test files compilation
compilePreviewTestJava.configure {
tasks.named("compilePreviewTestJava", JavaCompile) {
options.compilerArgs.add("--enable-preview")
}
// Configure tests execution
previewTest.configure {
tasks.named("previewTest", Test) {
jvmArgs = ['--enable-preview']
}
// Require the preview test suite to run as part of module check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ apply plugin: "idea"
// Must use Java 11 to build JFR enabled code - there is no JFR in OpenJDK 8 (revisit once JFR in Java 8 is available)
["compileMain_java11Java", "compileTestJava"].each { name ->
tasks.named(name, JavaCompile) {
it.sourceCompatibility = JavaVersion.VERSION_11
it.targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
setJavaVersion(it, 11)
it.options.compilerArgs.addAll(['-Xlint:all,-processing,-options,-path'])
options.compilerArgs.addAll(['-Xlint:all,-processing,-options,-path'])
}
}

forbiddenApisMain_java11 {
tasks.named("forbiddenApisMain_java11") {
failOnMissingClasses = false
}

Expand Down
4 changes: 2 additions & 2 deletions dd-java-agent/instrumentation/java-http-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ tasks.named("compileMain_java11Java", JavaCompile) {
setJavaVersion(it, 11)
}

compileTestGroovy {
tasks.named("compileTestGroovy", GroovyCompile) {
javaLauncher = getJavaLauncherFor(11)
}

forbiddenApisMain_java11 {
tasks.named("forbiddenApisMain_java11") {
failOnMissingClasses = false
}

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") {
tasks.named("test", Test) {
dependsOn "resteasy31Test"
dependsOn "nestedTest"
}
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/jdbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ tasks.named("check") {
dependsOn "oldPostgresTest"
}

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

Expand Down
8 changes: 4 additions & 4 deletions dd-java-agent/instrumentation/jersey/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ apply from: "$rootDir/gradle/java.gradle"
addTestSuiteForDir('jersey2JettyTest', 'jersey2JettyTest')
addTestSuiteForDir('jersey3JettyTest', 'jersey3JettyTest')

compileJersey3JettyTestGroovy {
tasks.named("compileJersey3JettyTestGroovy", GroovyCompile) {
javaLauncher = getJavaLauncherFor(11)
}
compileTestJava.configure {
tasks.named("compileTestJava", JavaCompile) {
setJavaVersion(it, 11)
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

jersey3JettyTest {
tasks.named("jersey3JettyTest", Test) {
javaLauncher = getJavaLauncherFor(11)
}
test {
tasks.named("test", Test) {
javaLauncher = getJavaLauncherFor(11)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ apply from: "$rootDir/gradle/java.gradle"
addTestSuiteForDir('latestDepTest', 'test')
addTestSuiteForDir('jetty11Test', 'test')
addTestSuiteForDir('jetty10LatestDepTest', 'test')
compileMain_java11Java.configure {

tasks.named("compileMain_java11Java", JavaCompile) {
it.sourceCompatibility = JavaVersion.VERSION_1_8
it.targetCompatibility = JavaVersion.VERSION_1_8
setJavaVersion(it, 11)
}

dependencies {
main_java11CompileOnly group: 'org.eclipse.jetty', name: 'jetty-client', version: '10.0.0'
main_java11Implementation(project(':dd-java-agent:instrumentation:jetty:jetty-client:jetty-client-common')) {
Expand Down
Loading
Loading