Skip to content

Commit

Permalink
Merge pull request #22 from DoJapHD/dev
Browse files Browse the repository at this point in the history
Update to Java 21
  • Loading branch information
DoJapHD authored Apr 11, 2024
2 parents 6f38e59 + 34e75c0 commit a51b38c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 33 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,6 @@ docs/generated/
run/

# LabyGradle | Addon Plugin
build-data.txt
build-data.txt

.assetsroot
12 changes: 2 additions & 10 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,13 @@ plugins {

dependencies {
labyApi("api")

// If you want to use external libraries, you can do that here.
// The dependencies that are specified here are loaded into your project but will also
// automatically be downloaded by labymod, but only if the repository is public.
// If it is private, you have to add and compile the dependency manually.
// You have to specify the repository, there are getters for maven central and sonatype, every
// other repository has to be specified with their url. Example:
// maven(mavenCentral(), "org.apache.httpcomponents:httpclient:4.5.13")
}

labyModProcessor {
referenceType = net.labymod.gradle.core.processor.ReferenceType.INTERFACE
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
10 changes: 7 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ plugins {
id("net.labymod.gradle.addon")
}


java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))

labyMod {
defaultPackageName = "de.dojaphd.sendserver.core" //change this to your main package name (used by all modules)
defaultPackageName = "de.dojaphd.sendserver.core"
addonInfo {
namespace = "sendserveraddon"
displayName = "Send To Server"
Expand All @@ -22,6 +21,7 @@ labyMod {
registerVersions(
"1.8.9",
"1.12.2",
"1.16.5",
"1.17.1",
"1.18.2",
"1.19.2",
Expand Down Expand Up @@ -70,7 +70,11 @@ fun configureRun(provider: net.labymod.gradle.core.minecraft.provider.VersionPro
args("--addon-dev-environment", "true")
}

provider.javaVersion = JavaVersion.VERSION_17
provider.javaVersion = when (gameVersion) {
else -> {
JavaVersion.VERSION_21
}
}

provider.mixin {
val mixinMinVersion = when (gameVersion) {
Expand Down
19 changes: 2 additions & 17 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
version = "0.1.0"

plugins {
id("java-library")
}

dependencies {
api(project(":api"))

// If you want to use external libraries, you can do that here.
// The dependencies that are specified here are loaded into your project but will also
// automatically be downloaded by labymod, but only if the repository is public.
// If it is private, you have to add and compile the dependency manually.
// You have to specify the repository, there are getters for maven central and sonatype, every
// other repository has to be specified with their url. Example:
// maven(mavenCentral(), "org.apache.httpcomponents:httpclient:4.5.13")
}

labyModProcessor {
referenceType = net.labymod.gradle.core.processor.ReferenceType.DEFAULT
}

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

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rootProject.name = "sendserveraddon"

pluginManagement {
val labyGradlePluginVersion = "0.3.44"
val labyGradlePluginVersion = "0.3.48"
plugins {
id("net.labymod.gradle") version (labyGradlePluginVersion)
}
Expand Down

0 comments on commit a51b38c

Please sign in to comment.