mirror of
https://github.com/JetBrains/intellij-platform-plugin-template.git
synced 2024-10-27 20:44:05 +00:00
Use JVM toolchain for configuring source/target compilation compatibility
This commit is contained in:
parent
e004764676
commit
9ba86cf3ce
3
.github/template-cleanup/gradle.properties
vendored
3
.github/template-cleanup/gradle.properties
vendored
@ -19,9 +19,6 @@ platformVersion = 2021.1.3
|
||||
# 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
|
||||
|
||||
# Gradle Releases -> https://github.com/gradle/gradle/releases
|
||||
gradleVersion = 7.4.1
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- Use JVM toolchain for configuring source/target compilation compatibility
|
||||
- Dependencies (GitHub Actions) - upgrade `actions/checkout` to `3`
|
||||
- Upgrade Gradle Wrapper to `7.4.1`
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import org.jetbrains.changelog.markdownToHTML
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
fun properties(key: String) = project.findProperty(key).toString()
|
||||
|
||||
@ -24,6 +23,13 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
// Set the JVM language level used to compile sources and generate files - Java 11 is required since 2020.3
|
||||
kotlin {
|
||||
jvmToolchain {
|
||||
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(11))
|
||||
}
|
||||
}
|
||||
|
||||
// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
|
||||
intellij {
|
||||
pluginName.set(properties("pluginName"))
|
||||
@ -49,17 +55,6 @@ qodana {
|
||||
}
|
||||
|
||||
tasks {
|
||||
// Set the JVM compatibility versions
|
||||
properties("javaVersion").let {
|
||||
withType<JavaCompile> {
|
||||
sourceCompatibility = it
|
||||
targetCompatibility = it
|
||||
}
|
||||
withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = it
|
||||
}
|
||||
}
|
||||
|
||||
wrapper {
|
||||
gradleVersion = properties("gradleVersion")
|
||||
}
|
||||
|
@ -19,9 +19,6 @@ platformVersion = 2021.1.3
|
||||
# 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
|
||||
|
||||
# Gradle Releases -> https://github.com/gradle/gradle/releases
|
||||
gradleVersion = 7.4.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user