Skip to content

Commit

Permalink
fix(build): java target version
Browse files Browse the repository at this point in the history
  • Loading branch information
Cubxity committed Apr 23, 2023
1 parent 94eee88 commit e0645ba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 1 addition & 3 deletions build.gradle.kts
Expand Up @@ -44,12 +44,10 @@ subprojects {

tasks.withType<KotlinCompile> {
kotlinOptions {
kotlinOptions.jvmTarget = "1.8"
freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn")
}
}
configure<KotlinJvmProjectExtension> {
jvmToolchain(8)
}
configure<JavaPluginExtension> {
targetCompatibility = JavaVersion.VERSION_1_8
}
Expand Down
8 changes: 6 additions & 2 deletions platforms/fabric/build.gradle.kts
Expand Up @@ -59,9 +59,8 @@ loom {

tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.jvmTarget = "16"
}

processResources {
inputs.property("version", project.version)

Expand All @@ -75,6 +74,11 @@ tasks {
}
}

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

blossom {
replaceTokenIn("src/main/kotlin/dev/cubxity/plugins/metrics/fabric/bootstrap/UnifiedMetricsFabricBootstrap.kt")
replaceToken("@version@", version)
Expand Down
15 changes: 8 additions & 7 deletions platforms/minestom/build.gradle.kts
Expand Up @@ -31,10 +31,6 @@ dependencies {
testImplementation("com.github.minestom.minestom:Minestom:a9e319f961")
}

java {
targetCompatibility = JavaVersion.VERSION_17
}

tasks {
shadowJar {
archiveClassifier.set("")
Expand All @@ -46,9 +42,10 @@ tasks {
relocate("io.prometheus", "dev.cubxity.plugins.metrics.libs.io.prometheus")
}
compileKotlin {
kotlinOptions {
jvmTarget = "17"
}
kotlinOptions.jvmTarget = "17"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "17"
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
Expand All @@ -59,3 +56,7 @@ tasks {
}
}
}

java {
targetCompatibility = JavaVersion.VERSION_17
}

0 comments on commit e0645ba

Please sign in to comment.