Skip to content

Commit

Permalink
[ML4SE-293] Changed ktor jdk to 11.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikrise2 committed Jan 9, 2024
1 parent 31d9c00 commit 8af6e67
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 15 deletions.
14 changes: 0 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -38,18 +36,6 @@ allprojects {
}

tasks {
withType<JavaCompile> {
sourceCompatibility = jdkVersion
targetCompatibility = JavaVersion.VERSION_17.toString()
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
}

withType<Detekt>().configureEach {
jvmTarget = jdkVersion
}

test {
useJUnit()
}
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 16 additions & 0 deletions ij-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.changelog.markdownToHTML

group = rootProject.group
Expand All @@ -10,6 +11,8 @@ plugins {
alias(libs.plugins.intellij)
}

val jdkVersion = libs.versions.jdk17.get()

dependencies {
implementation(rootProject.libs.kaml)
implementation(rootProject.libs.snakeyaml)
Expand Down Expand Up @@ -53,4 +56,17 @@ tasks {
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))
}

withType<JavaCompile> {
sourceCompatibility = jdkVersion
targetCompatibility = JavaVersion.VERSION_17.toString()
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
}

withType<Detekt>().configureEach {
jvmTarget = jdkVersion
}

}
18 changes: 18 additions & 0 deletions ij-server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import io.gitlab.arturbosch.detekt.Detekt

group = rootProject.group
version = rootProject.version

Expand All @@ -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")

Expand All @@ -25,3 +29,17 @@ dependencies {
testImplementation(rootProject.libs.ktor.server.tests)
testImplementation(rootProject.libs.h2)
}

tasks{
withType<JavaCompile> {
sourceCompatibility = jdkVersion
targetCompatibility = JavaVersion.VERSION_17.toString()
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
}

withType<Detekt>().configureEach {
jvmTarget = jdkVersion
}
}

0 comments on commit 8af6e67

Please sign in to comment.