Skip to content

Commit f0a832f

Browse files
committed
Decouple test JDK and gradle JDK in selenium latestDepTest
1 parent f1d359b commit f0a832f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

dd-java-agent/instrumentation/selenium/build.gradle

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ plugins {
22
id 'java-test-fixtures'
33
}
44

5+
ext {
6+
latestDepTestMinJavaVersionForTests = JavaVersion.VERSION_11
7+
}
8+
59
apply from: "$rootDir/gradle/java.gradle"
610

711
muzzle {
@@ -38,9 +42,8 @@ configurations.matching({ it.name.startsWith('test') || it.name.startsWith('late
3842
}
3943
})
4044

41-
tasks.matching { it.name.startsWith('latestDepTest') || it.name.contains('LatestDepTest') }.each {
42-
it.onlyIf {
43-
// Only run latest dep tests tasks (including compilation) if the current JVM is compatible with the latest Selenium version
44-
JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)
45-
}
45+
tasks.named("compileLatestDepTestJava").configure {
46+
setJavaVersion(it, 11)
47+
sourceCompatibility = JavaVersion.VERSION_1_8
48+
targetCompatibility = JavaVersion.VERSION_1_8
4649
}

0 commit comments

Comments
 (0)