Skip to content

Commit 61c2d97

Browse files
authored
Update smoke test tasks to use lazy API (#9617)
* Update smoke test tasks A-C * Update smoke test tasks D-M * Update smoke test tasks N-R * Update smoke test tasks S-Z * Add missing types
1 parent 050cad8 commit 61c2d97

File tree

52 files changed

+93
-75
lines changed

Some content is hidden

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

52 files changed

+93
-75
lines changed

dd-smoke-tests/appsec/springboot-grpc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ apply from: "$rootDir/gradle/java.gradle"
1111

1212
// The standard spring-boot plugin doesn't play nice with our project
1313
// so we'll build a fat jar instead
14-
jar {
14+
tasks.named("jar", Jar) {
1515
manifest {
1616
attributes('Main-Class': 'datadog.smoketest.appsec.springboot.SpringbootApplication')
1717
}

dd-smoke-tests/appsec/springboot-security/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ description = 'SpringBoot Smoke Tests.'
88

99
// The standard spring-boot plugin doesn't play nice with our project
1010
// so we'll build a fat jar instead
11-
jar {
11+
tasks.named("jar", Jar) {
1212
manifest {
1313
attributes('Main-Class': 'datadog.smoketest.appsec.springbootsecurity.SpringbootApplication')
1414
}
1515
}
1616

17-
forbiddenApisMain {
17+
tasks.named("forbiddenApisMain") {
1818
failOnMissingClasses = false
1919
}
2020

dd-smoke-tests/appsec/springboot/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description = 'SpringBoot Smoke Tests.'
77

88
// The standard spring-boot plugin doesn't play nice with our project
99
// so we'll build a fat jar instead
10-
jar {
10+
tasks.named("jar", Jar) {
1111
manifest {
1212
attributes('Main-Class': 'datadog.smoketest.appsec.springboot.SpringbootApplication')
1313
}

dd-smoke-tests/cli/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
apply from: "$rootDir/gradle/java.gradle"
66
description = 'Command Line Application Smoke Tests.'
77

8-
jar {
8+
tasks.named("jar", Jar) {
99
manifest {
1010
attributes('Main-Class': 'datadog.smoketest.cli.CliApplication')
1111
}

dd-smoke-tests/concurrent/java-21/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ java {
1717
languageVersion = JavaLanguageVersion.of(21)
1818
}
1919
}
20+
2021
tasks.withType(JavaCompile).configureEach {
2122
setJavaVersion(it, 21)
2223
sourceCompatibility = JavaVersion.VERSION_21
@@ -27,9 +28,10 @@ tasks.withType(JavaCompile).configureEach {
2728
// * forbiddenApis is missing classes
2829
// * spotless as the google-java-format version does not support Java 21 and can't be changed once applied
2930
// * spotbugs failed to read class using newer bytecode versions
30-
forbiddenApisMain {
31+
tasks.named("forbiddenApisMain") {
3132
failOnMissingClasses = false
3233
}
34+
3335
['spotlessApply', 'spotlessCheck', 'spotlessJava', 'spotbugsMain'].each {
3436
tasks.named(it) { enabled = false }
3537
}

dd-smoke-tests/concurrent/java-25/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ tasks.named('compileTestGroovy') {
4242
// * forbiddenApis is missing classes
4343
// * spotless as the google-java-format version does not support Java 25 and can't be changed once applied
4444
// * spotbugs failed to read class using newer bytecode versions
45-
forbiddenApisMain {
45+
tasks.named("forbiddenApisMain") {
4646
failOnMissingClasses = false
4747
}
48+
4849
['spotlessApply', 'spotlessCheck', 'spotlessJava', 'spotbugsMain'].each {
4950
tasks.named(it) { enabled = false }
5051
}

dd-smoke-tests/crashtracking/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ apply from: "$rootDir/gradle/java.gradle"
1010

1111
description = 'Crashtracking Integration Tests.'
1212

13-
jar {
13+
tasks.named("jar", Jar) {
1414
manifest {
1515
attributes('Main-Class': 'datadog.smoketest.crashtracking.CrashtrackingTestApplication')
1616
}

dd-smoke-tests/custom-systemloader/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2+
13
plugins {
24
id 'com.gradleup.shadow'
35
}
46

57
description = 'Check classes loaded by custom system class-loader are transformed'
68
apply from: "$rootDir/gradle/java.gradle"
79

8-
jar {
10+
tasks.named("jar", Jar) {
911
manifest {
1012
attributes('Main-Class': 'sample.app.App')
1113
}
1214
}
1315

14-
shadowJar {
16+
tasks.named("shadowJar", ShadowJar) {
1517
configurations = [project.configurations.runtimeClasspath]
1618
}
1719

dd-smoke-tests/datastreams/kafkaschemaregistry/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ apply from: "$rootDir/gradle/java.gradle"
88
apply from: "$rootDir/gradle/spring-boot-plugin.gradle"
99
description = 'Kafka Smoke Tests.'
1010

11-
jar {
11+
tasks.named("jar", Jar) {
1212
manifest {
1313
attributes('Main-Class': 'datadog.smoketest.datastreams.kafkaschemaregistry.KafkaProducerWithSchemaRegistry')
1414
}

dd-smoke-tests/debugger-integration-tests/latest-jdk-app/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2+
13
plugins {
24
// Apply the application plugin to add support for building a CLI application in Java.
35
id 'application'
46
id 'com.gradleup.shadow'
57
}
68

7-
shadowJar {
9+
tasks.named("shadowJar", ShadowJar) {
810
// Define the main class for the application.
911
mainClass = 'App'
1012
}

0 commit comments

Comments
 (0)