Skip to content

Commit

Permalink
Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed May 31, 2024
1 parent e1924bb commit dcf1b41
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 17
java-version: 21

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
6 changes: 0 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,8 @@ allprojects {
}
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

subprojects {
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = Versions.JVM_TARGET
kotlinOptions.javaParameters = true
}
}
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object Versions {
const val KOTLIN_COROUTINES = "1.6.0"
const val KOTLIN_LOGGING = "2.1.16"

const val JVM_TARGET = "17"
const val JVM_TARGET = "21"
const val KOTLINX_DATE_TIME = "0.3.3"
const val PROMETHEUS = "0.12.0"
}
13 changes: 4 additions & 9 deletions loritta-bot-discord/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = Versions.JVM_TARGET
}

plugins {
java
kotlin("jvm")
Expand Down Expand Up @@ -211,7 +205,8 @@ jib {
}
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(Versions.JVM_TARGET))
}
}
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ dependencyResolutionManagement {
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
}

rootProject.name = "loritta-parent"

// ===[ PUDDING ]===
Expand Down
8 changes: 4 additions & 4 deletions switch-twitch/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
java
kotlin("jvm")
Expand All @@ -16,8 +14,10 @@ dependencies {
implementation(libs.kotlinx.serialization.json)
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = Versions.JVM_TARGET
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(Versions.JVM_TARGET))
}
}

tasks.test {
Expand Down
6 changes: 6 additions & 0 deletions temmie-discord-auth-loritta-commons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ dependencies {
implementation(libs.kotlinx.serialization.json)
implementation(libs.ktor.server.core)
implementation(libs.ktor.server.sessions)
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(Versions.JVM_TARGET))
}
}
6 changes: 6 additions & 0 deletions temmie-discord-auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ dependencies {
testImplementation("org.assertj:assertj-core:3.12.2")
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(Versions.JVM_TARGET))
}
}

tasks.test {
useJUnitPlatform()
}

0 comments on commit dcf1b41

Please sign in to comment.