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 + } +}