Skip to content

Commit 6076c53

Browse files
committed
build(gradle-plugin): Prepare for upgrading to Gradle 9
Gradle 9 will raise the built-in Kotlin version [1], so ensure compatibility with older Gradle versions using older Kotlin versions. [1]: https://docs.gradle.org/9.0.0-milestone-9/userguide/upgrading_version_8.html#plugins_written_with_the_kotlin_dsl_require_gradle_8_11_by_default Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 038573a commit 6076c53

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugins/package-managers/gradle-plugin/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
21+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
2122
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2223

2324
plugins {
@@ -54,6 +55,11 @@ tasks.named<JavaCompile>("compileJava") {
5455
tasks.named<KotlinCompile>("compileKotlin") {
5556
compilerOptions {
5657
jvmTarget = gradleToolingApiLowestSupportedJavaVersion
58+
59+
// See https://docs.gradle.org/current/userguide/compatibility.html#kotlin.
60+
freeCompilerArgs = listOf("-Xsuppress-version-warnings")
61+
languageVersion = @Suppress("DEPRECATION") KotlinVersion.KOTLIN_1_7
62+
apiVersion = @Suppress("DEPRECATION") KotlinVersion.KOTLIN_1_7
5763
}
5864
}
5965

0 commit comments

Comments
 (0)