Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java Runtime versions change #92

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_11.toString()
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
}

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