Skip to content

Commit 2d64314

Browse files
committed
Don't apply code formatting plugins if Java version < 17
spotless-plugin-gradle dropped Java <17 support in version 8.0.0.
1 parent cc4feb6 commit 2d64314

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

buildSrc/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ dependencies {
1414
implementation("io.franzbecker:gradle-lombok:5.0.0")
1515

1616
// Spotless dropped Java 8 support in version 2.33.0
17-
if (JavaVersion.current().isJava11Compatible) {
17+
// spotless-plugin-gradle dropped Java <17 support in version 8.0.0
18+
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
1819
implementation("com.diffplug.spotless:spotless-plugin-gradle:8.0.0")
1920
implementation("io.github.cosmicsilence:gradle-scalafix:0.2.2")
2021
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Spotless dropped Java 8 support in version 2.33.0
2-
if (JavaVersion.current().isJava11Compatible) {
2+
// spotless-plugin-gradle dropped Java <17 support in version 8.0.0
3+
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
34
apply(plugin = "project-convention-code-formatting-internal")
45
}

0 commit comments

Comments
 (0)