Skip to content

Commit

Permalink
Bump to java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Dec 18, 2024
1 parent 1271a96 commit 3345a7b
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 30 deletions.
5 changes: 3 additions & 2 deletions build-data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

sourceSets {
Expand Down
18 changes: 0 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,3 @@ tasks.create("outputVersion") {
println(project.version)
}
}

val platforms = setOf(
projects.pistonqueueBukkit,
projects.pistonqueueBungee,
projects.pistonqueueVelocity
).map { it.dependencyProject }

val special = setOf(
projects.pistonqueueUniversal,
projects.pistonqueueShared
).map { it.dependencyProject }

subprojects {
when (this) {
in platforms -> plugins.apply("pq.platform-conventions")
in special -> plugins.apply("pq.java-conventions")
}
}
11 changes: 6 additions & 5 deletions buildSrc/src/main/kotlin/pq.java-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

dependencies {
Expand Down Expand Up @@ -56,10 +57,10 @@ indra {
}

javaVersions {
target(17)
target(21)
strictVersions()
testWith(17)
minimumToolchain(17)
testWith(21)
minimumToolchain(21)
}
}

Expand Down
5 changes: 0 additions & 5 deletions buildSrc/src/main/kotlin/pq.shadow-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ plugins {
id("com.github.johnrengelman.shadow")
}

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

tasks {
jar {
archiveClassifier.set("unshaded")
Expand Down
4 changes: 4 additions & 0 deletions bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id("pq.platform-conventions")
}

dependencies {
implementation("org.bstats:bstats-bukkit:3.1.0")

Expand Down
4 changes: 4 additions & 0 deletions bungee/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id("pq.platform-conventions")
}

dependencies {
implementation(projects.pistonqueueShared)

Expand Down
4 changes: 4 additions & 0 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id("pq.java-conventions")
}

dependencies {
implementation("org.spongepowered:configurate-yaml:4.1.2")
compileOnly("net.pistonmaster:pistonmotd-api:5.1.1")
Expand Down
4 changes: 4 additions & 0 deletions universal/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("pq.java-conventions")
}

val platforms = setOf(
rootProject.projects.pistonqueueBukkit,
rootProject.projects.pistonqueueBungee,
Expand Down
4 changes: 4 additions & 0 deletions velocity/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id("pq.platform-conventions")
}

dependencies {
implementation(projects.pistonqueueShared)
compileOnly(projects.pistonqueueBuildData)
Expand Down

0 comments on commit 3345a7b

Please sign in to comment.