Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
kotlin 2, gradle 8.8; update shadow to reduce deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
homchom committed Jun 26, 2024
1 parent 920f6bc commit 535937b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
18 changes: 7 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs = -Xmx1G
org.gradle.jvmargs = -Xmx1G

# https://fabricmc.net/develop/

Expand All @@ -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
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
8 changes: 6 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 535937b

Please sign in to comment.