Skip to content

Commit cbec867

Browse files
authored
Remove outdated version checks (#2722)
2 parents c456ca0 + 273250c commit cbec867

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

lib-extra/build.gradle

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ spotless {
3838

3939
apply from: rootProject.file('gradle/special-tests.gradle')
4040
tasks.withType(Test).configureEach {
41-
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_16)) {
42-
// needed for EclipseCdtFormatterStepTest
43-
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
44-
}
41+
// needed for EclipseCdtFormatterStepTest
42+
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
4543
}
4644

4745
def NEEDS_P2_DEPS = [
@@ -50,9 +48,6 @@ def NEEDS_P2_DEPS = [
5048
'groovy',
5149
'jdt'
5250
]
53-
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
54-
NEEDS_P2_DEPS.remove('cdt')
55-
}
5651
for (needsP2 in NEEDS_P2_DEPS) {
5752
sourceSets.register(needsP2) {
5853
compileClasspath += sourceSets.main.output

lib/build.gradle

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,9 @@ spotbugs {
131131

132132
apply from: rootProject.file('gradle/special-tests.gradle')
133133
tasks.withType(Test).configureEach {
134-
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_16)) {
135-
// https://docs.gradle.org/7.5/userguide/upgrading_version_7.html#removes_implicit_add_opens_for_test_workers
136-
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED"
137-
}
134+
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED"
138135

139-
if (GradleVersion.current() >= GradleVersion.version('9.0')) {
140-
// https://github.com/gradle/gradle/issues/33619
141-
failOnNoDiscoveredTests = false
142-
}
136+
failOnNoDiscoveredTests = false
143137
}
144138

145139
jar {

testlib/build.gradle

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,11 @@ spotbugs {
3131

3232
apply from: rootProject.file('gradle/special-tests.gradle')
3333
tasks.withType(Test).configureEach {
34-
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_16)) {
35-
// for Antlr4FormatterStepTest, KtfmtStepTest, and KtLintStepTest
36-
def args = [
34+
// for Antlr4FormatterStepTest, KtfmtStepTest, and KtLintStepTest
35+
jvmArgs(
3736
'--add-opens=java.base/java.lang=ALL-UNNAMED',
3837
'--add-opens=java.base/java.util=ALL-UNNAMED',
39-
]
40-
jvmArgs args
41-
}
38+
)
4239
}
4340

4441
javadoc {

0 commit comments

Comments
 (0)