From a396820b68cb9a8db65da43c1c33c375b9c6aa14 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 5 Jul 2021 21:58:29 +0200 Subject: [PATCH] JVM compatibility version extracted to `gradle.properties` file --- .github/template-cleanup/gradle.properties | 5 +++++ CHANGELOG.md | 1 + build.gradle.kts | 23 +++++++++++----------- gradle.properties | 3 +++ 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/template-cleanup/gradle.properties b/.github/template-cleanup/gradle.properties index 6b4c467..bb61573 100644 --- a/.github/template-cleanup/gradle.properties +++ b/.github/template-cleanup/gradle.properties @@ -22,6 +22,11 @@ platformDownloadSources = true # Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 platformPlugins = +# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3 +javaVersion = 11 + +gradleVersion = 7.1.1 + # Opt-out flag for bundling Kotlin standard library. # See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details. # suppress inspection "UnusedProperty" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c67313..a922226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - GitHub Actions: UI Tests workflow - Suppress `UnusedProperty` inspection for the `kotlin.stdlib.default.dependency` in `gradle.properties` - Use Gradle `wrapper` task to handle Gradle updates +- JVM compatibility version extracted to `gradle.properties` file ### Changed - Update `pluginVerifierIdeVersions` to `2020.3.4, 2021.1.3` diff --git a/build.gradle.kts b/build.gradle.kts index c610f02..ed11717 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -66,17 +66,18 @@ detekt { // Configure UI tests plugin // Read more: https://github.com/JetBrains/intellij-ui-test-robot tasks { - // Set the compatibility versions to 1.8 - withType { - sourceCompatibility = "1.8" - targetCompatibility = "1.8" - } - withType { - kotlinOptions.jvmTarget = "1.8" - } - - withType { - jvmTarget = "1.8" + // Set the JVM compatibility versions + properties("javaVersion").let { + withType { + sourceCompatibility = it + targetCompatibility = it + } + withType { + kotlinOptions.jvmTarget = it + } + withType { + jvmTarget = it + } } wrapper { diff --git a/gradle.properties b/gradle.properties index 2ed5c54..92d5963 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,6 +22,9 @@ platformDownloadSources = true # Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 platformPlugins = +# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3 +javaVersion = 11 + gradleVersion = 7.1.1 # Opt-out flag for bundling Kotlin standard library.