From 6483a769bccf6cd925569cec0cd0a4e9f3b29d87 Mon Sep 17 00:00:00 2001 From: Sebastiano Poggi Date: Wed, 7 Aug 2024 20:01:52 +0200 Subject: [PATCH] Add Kotlin 2.0.0 to IJ plugin --- ktfmt_idea_plugin/build.gradle.kts | 8 ++------ ktfmt_idea_plugin/gradle/libs.versions.toml | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ktfmt_idea_plugin/build.gradle.kts b/ktfmt_idea_plugin/build.gradle.kts index b68365c2..f41c343b 100644 --- a/ktfmt_idea_plugin/build.gradle.kts +++ b/ktfmt_idea_plugin/build.gradle.kts @@ -18,6 +18,7 @@ import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType.* plugins { java + alias(libs.plugins.kotlin) alias(libs.plugins.intelliJPlatform) alias(libs.plugins.spotless) } @@ -29,12 +30,7 @@ group = "com.facebook" version = "$pluginVersion.$ktfmtVersion" -java { - toolchain { - targetCompatibility = JavaVersion.VERSION_17 - sourceCompatibility = JavaVersion.VERSION_17 - } -} +kotlin { jvmToolchain(17) } repositories { mavenCentral() diff --git a/ktfmt_idea_plugin/gradle/libs.versions.toml b/ktfmt_idea_plugin/gradle/libs.versions.toml index 39fa8f3f..e68e6ce0 100644 --- a/ktfmt_idea_plugin/gradle/libs.versions.toml +++ b/ktfmt_idea_plugin/gradle/libs.versions.toml @@ -1,5 +1,6 @@ [versions] googleJavaFormat = "1.23.0" +kotlin = "2.0.0" # plugins gradlePlugin-intelliJPlatform = "2.0.0" @@ -9,5 +10,6 @@ gradlePlugin-spotless = "6.25.0" googleJavaFormat = { module = "com.google.googlejavaformat:google-java-format", version.ref = "googleJavaFormat" } [plugins] +kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "gradlePlugin-intelliJPlatform" } spotless = { id = "com.diffplug.spotless", version.ref = "gradlePlugin-spotless" }