From 8af6e67955c2b5a47acf9ec96c8c0201b196b654 Mon Sep 17 00:00:00 2001 From: mikrise2 Date: Tue, 9 Jan 2024 14:44:18 +0100 Subject: [PATCH 1/2] [ML4SE-293] Changed ktor jdk to 11. --- build.gradle.kts | 14 -------------- gradle/libs.versions.toml | 3 ++- ij-plugin/build.gradle.kts | 16 ++++++++++++++++ ij-server/build.gradle.kts | 18 ++++++++++++++++++ 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2281bc86..0a8c48c5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,8 +16,6 @@ plugins { group = properties("pluginGroup").get() version = properties("pluginVersion").get() -val jdkVersion = libs.versions.jdk.get() - allprojects { apply { with(rootProject.libs.plugins) { @@ -38,18 +36,6 @@ allprojects { } tasks { - withType { - sourceCompatibility = jdkVersion - targetCompatibility = JavaVersion.VERSION_17.toString() - } - withType { - kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() - } - - withType().configureEach { - jvmTarget = jdkVersion - } - test { useJUnit() } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b12114d4..752139b0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,8 @@ kotlin = "1.8.10" intellij = "1.16.1" detekt = "1.22.0" buildconfig = "3.1.0" -jdk = "17" +jdk17 = "17" +jdk11 = "11" kaml = "0.52.0" serialization = "1.8.10" snakeyaml = "2.0" diff --git a/ij-plugin/build.gradle.kts b/ij-plugin/build.gradle.kts index e3a22dc6..100f9a39 100644 --- a/ij-plugin/build.gradle.kts +++ b/ij-plugin/build.gradle.kts @@ -1,3 +1,4 @@ +import io.gitlab.arturbosch.detekt.Detekt import org.jetbrains.changelog.markdownToHTML group = rootProject.group @@ -10,6 +11,8 @@ plugins { alias(libs.plugins.intellij) } +val jdkVersion = libs.versions.jdk17.get() + dependencies { implementation(rootProject.libs.kaml) implementation(rootProject.libs.snakeyaml) @@ -53,4 +56,17 @@ tasks { sinceBuild.set(properties("pluginSinceBuild")) untilBuild.set(properties("pluginUntilBuild")) } + + withType { + sourceCompatibility = jdkVersion + targetCompatibility = JavaVersion.VERSION_17.toString() + } + withType { + kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() + } + + withType().configureEach { + jvmTarget = jdkVersion + } + } diff --git a/ij-server/build.gradle.kts b/ij-server/build.gradle.kts index 23d5c8e0..7f1e64a0 100644 --- a/ij-server/build.gradle.kts +++ b/ij-server/build.gradle.kts @@ -1,3 +1,5 @@ +import io.gitlab.arturbosch.detekt.Detekt + group = rootProject.group version = rootProject.version @@ -6,6 +8,8 @@ plugins { id(libs.plugins.ktor.get().pluginId) version libs.versions.ktor.get() } +val jdkVersion = libs.versions.jdk11.get() + application { mainClass.set("org.jetbrains.research.tasktracker.ApplicationKt") @@ -25,3 +29,17 @@ dependencies { testImplementation(rootProject.libs.ktor.server.tests) testImplementation(rootProject.libs.h2) } + +tasks{ + withType { + sourceCompatibility = jdkVersion + targetCompatibility = JavaVersion.VERSION_17.toString() + } + withType { + kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() + } + + withType().configureEach { + jvmTarget = jdkVersion + } +} From f049a099ffb0ac46ef9a67fdbe2e32f0581759e9 Mon Sep 17 00:00:00 2001 From: mikrise2 Date: Tue, 9 Jan 2024 14:50:30 +0100 Subject: [PATCH 2/2] [ML4SE-293] Changed ktor Compatibility. --- ij-server/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ij-server/build.gradle.kts b/ij-server/build.gradle.kts index 7f1e64a0..916f2cf1 100644 --- a/ij-server/build.gradle.kts +++ b/ij-server/build.gradle.kts @@ -33,10 +33,10 @@ dependencies { tasks{ withType { sourceCompatibility = jdkVersion - targetCompatibility = JavaVersion.VERSION_17.toString() + targetCompatibility = JavaVersion.VERSION_11.toString() } withType { - kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() + kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString() } withType().configureEach {