Skip to content

Commit

Permalink
Switch to Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Jun 21, 2024
1 parent a84a36e commit f3ddc54
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import dev.kord.gradle.tools.KordExtension
import dev.kord.gradle.tools.KordGradlePlugin
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("org.jetbrains.dokka")
Expand Down Expand Up @@ -31,6 +33,10 @@ tasks {
subprojects {
afterEvaluate {
apply<KordGradlePlugin>()
configure<KordExtension> {
publicationName = "mavenCentral"
jvmTarget = JvmTarget.JVM_17
}
}
group = rootProject.group

Expand Down
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/lavalink-jvm-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ repositories {
}

kotlin {
jvmToolchain(17)
explicitApi()

sourceSets {
Expand All @@ -30,12 +31,12 @@ kotlin {
}

compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
jvmTarget = JvmTarget.JVM_17
}
}

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

tasks {
Expand Down
7 changes: 1 addition & 6 deletions buildSrc/src/main/kotlin/lavalink-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ repositories {
kotlin {
explicitApi()

jvm {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
}
}
jvm()

// See https://github.com/DRSchlaubi/Lavakord/issues/2
js(IR) {
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ kotlin.mpp.stability.nowarn=true
SONATYPE_CONNECT_TIMEOUT_SECONDS=300
nextPlannedVersion=6.4.0
kotlinx.atomicfu.enableJvmIrTransformation=true
kotlinx.atomicfu.enableJsIrTransformation=true
2 changes: 2 additions & 0 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#This file is generated by updateDaemonJvm
toolchainVersion=17
11 changes: 0 additions & 11 deletions java/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinJvm
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
`lavalink-jvm-module`
Expand All @@ -17,16 +16,6 @@ dependencies {
}


kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_11
}
}

java {
sourceCompatibility = JavaVersion.VERSION_11
}

mavenPublishing {
configure(KotlinJvm(JavadocJar.Dokka("dokkaHtml")))
}
11 changes: 0 additions & 11 deletions jda-java/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinJvm
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
`lavalink-jvm-module`
Expand All @@ -12,16 +11,6 @@ dependencies {
api(projects.java)
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_11
}
}

java {
sourceCompatibility = JavaVersion.VERSION_11
}

mavenPublishing {
configure(KotlinJvm(JavadocJar.Dokka("dokkaHtml")))
}
10 changes: 0 additions & 10 deletions plugins/lavasearch/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ plugins {
}

kotlin {
jvm {
compilations.all {
compileTaskProvider.configure {
compilerOptions {
jvmTarget = JvmTarget.JVM_11
}
}
}
}

sourceSets {
all {
languageSettings.optIn("kotlin.contracts.ExperimentalContracts")
Expand Down
10 changes: 0 additions & 10 deletions plugins/lavasrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ plugins {
}

kotlin {
jvm {
compilations.all {
compileTaskProvider.configure {
compilerOptions {
jvmTarget = JvmTarget.JVM_11
}
}
}
}

sourceSets {
all {
languageSettings.optIn("kotlin.contracts.ExperimentalContracts")
Expand Down
10 changes: 0 additions & 10 deletions plugins/lyrics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ plugins {
}

kotlin {
jvm {
compilations.all {
compileTaskProvider.configure {
compilerOptions {
jvmTarget = JvmTarget.JVM_11
}
}
}
}

sourceSets {
all {
languageSettings.optIn("kotlin.contracts.ExperimentalContracts")
Expand Down

0 comments on commit f3ddc54

Please sign in to comment.