diff --git a/build.gradle.kts b/build.gradle.kts index 70040408..65bafa9f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,12 +1,11 @@ -import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.9.23" + kotlin("jvm") version "2.0.0" id("fabric-loom") version "1.5-SNAPSHOT" id("com.modrinth.minotaur") version "2.+" - id("com.github.johnrengelman.shadow") version "7.1.2" + id("com.github.johnrengelman.shadow") version "8.1.1" } val modName: String by project @@ -144,20 +143,17 @@ tasks { enabled = false } - val relocate by registering(ConfigureShadowRelocation::class) { - // repackage shaded dependencies - target = shadowJar.get() - prefix = "$mavenGroup.recode.shaded" - } - shadowJar { - dependsOn(relocate.get()) configurations = listOf(shade) + from("LICENSE") + // output shaded jar in the correct destination to be used by remapJar destinationDirectory.set(file("build/devlibs")) archiveClassifier.set("dev") - from("LICENSE") + // relocate + isEnableRelocation = true + relocationPrefix = "$mavenGroup.$modName.shaded" } remapJar { diff --git a/gradle.properties b/gradle.properties index 2f761e94..016b69ed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -org.gradle.jvmargs = -Xmx1G +org.gradle.jvmargs = -Xmx1G # https://fabricmc.net/develop/ @@ -15,7 +15,7 @@ loaderVersion = 0.15.2 # ideally, pick versions without bugs but not versions with unused features (for compatibility) fabricVersion = 0.96.1+1.20.4 -flkVersion = 1.10.19+kotlin.1.9.23 +flkVersion = 1.11.0+kotlin.2.0.0 # required dependency mods required.adventure-platform-fabric.artifact = net.kyori:adventure-platform-fabric diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index c1962a79..7f93135c 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c30b486a..a4413138 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index aeb74cbb..0adc8e1a 100755 --- a/gradlew +++ b/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -130,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can.