Skip to content

Commit

Permalink
update build (loom 1.8, gradle 8.10, remove jitpack dependency)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fourmisain committed Oct 19, 2024
1 parent 324f153 commit 9ba7ea3
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 18 deletions.
22 changes: 16 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'maven-publish'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'com.modrinth.minotaur' version '2.+'
Expand All @@ -19,16 +19,24 @@ loom {
repositories {
maven { url 'https://maven.shedaniel.me/' }
maven { url 'https://maven.terraformersmc.com/' }
maven { url 'https://jitpack.io' }
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
mavenCentral()
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"

implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:${mixin_extras_version}"))

modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"

Expand All @@ -40,15 +48,15 @@ dependencies {
exclude(group: "net.fabricmc.fabric-api")
}

modCompileOnly "com.github.Fourmisain:fabric-seasons:jitpack-SNAPSHOT"
modImplementation "maven.modrinth:fabric-seasons:${project.fabric_seasons_version}"
}

processResources {
// expand all properties from gradle.properties
def stringProperties = providers.gradlePropertiesPrefixedBy('').get()
stringProperties.each { inputs.property(it.key, it.value) }

['fabric.mod.json', "${project.mod_id}.mixins.json"].each {
['*.mod.json', "*.mixins.json"].each {
filesMatching(it) {
expand(stringProperties) {
escapeBackslash = true
Expand Down Expand Up @@ -104,6 +112,8 @@ modrinth {
}
}

tasks.modrinth.dependsOn("build")

curseforge {
def CURSEFORGE_TOKEN = System.getenv('CURSEFORGE_TOKEN')
if (CURSEFORGE_TOKEN != null) {
Expand Down
18 changes: 8 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@ org.gradle.warning.mode=all

# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.21
yarn_mappings=1.21+build.1
loader_version=0.15.11
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.7

# Mod Properties
mod_version=1.16.2
maven_group=randommcsomethin
mod_id=fallingleaves
archives_base_name=fallingleaves

# Required Dependencies
# Dependencies
java_version=21
mixin_extras_version=0.3.5
fabric_api_version=0.100.1+1.21
cloth_config_version=15.0.127

# Suggested Dependencies
modmenu_version=11.0.0-beta.1
fabric_api_version=0.106.0+1.21.1
cloth_config_version=15.0.140
modmenu_version=11.0.3
fabric_seasons_version=2.4.2-BETA+1.21

# Publishing
modrinth_id=WhbRG4iK
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# 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
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down

0 comments on commit 9ba7ea3

Please sign in to comment.