@@ -2,6 +2,11 @@ plugins {
22 id ' java-test-fixtures'
33}
44
5+ ext {
6+ // testng 7.6.0+ requires Java 11 or higher.
7+ latestDepTestMinJavaVersionForTests = JavaVersion . VERSION_11
8+ }
9+
510apply from : " $rootDir /gradle/java.gradle"
611
712muzzle {
@@ -21,6 +26,8 @@ muzzle {
2126}
2227
2328addTestSuiteForDir(' latestDepTest' , ' test' )
29+ // testng 7.5.1 is the latest version compatible with Java 8
30+ addTestSuiteForDir(' testng751Test' , ' test' )
2431
2532dependencies {
2633 compileOnly group : ' org.testng' , name : ' testng' , version : ' 7.0.0'
@@ -29,7 +36,7 @@ dependencies {
2936
3037 testImplementation testFixtures(project(' :dd-java-agent:instrumentation:testng' ))
3138 testImplementation group : ' org.testng' , name : ' testng' , version : ' 7.0.0'
32-
39+ testng751TestImplementation group : ' org.testng ' , name : ' testng ' , version : ' 7.5.1 '
3340 latestDepTestImplementation group : ' org.testng' , name : ' testng' , version : ' +'
3441}
3542
@@ -41,9 +48,3 @@ configurations.matching({ it.name.startsWith('test') }).each({
4148 }
4249})
4350
44- configurations. matching({ it. name. startsWith(' latestDepTest' ) }). each({
45- it. resolutionStrategy {
46- // TestNG 7.6+ is compiled with Java 11
47- force group : ' org.testng' , name : ' testng' , version : (JavaVersion . current(). java11Compatible ? ' +' : ' 7.5' )
48- }
49- })
0 commit comments