Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Gradle Wrapper, Loom, Minotaur and FAPI #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 19 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "com.modrinth.minotaur" version "1.2.1"
id 'fabric-loom' version '0.12-SNAPSHOT'
id "com.modrinth.minotaur" version "2.+"
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'maven-publish'
}

Expand Down Expand Up @@ -38,29 +38,25 @@ processResources {
}
}

task publishModrinth (type: com.modrinth.minotaur.TaskModrinthUpload, dependsOn: remapJar) {
doFirst {
var modrinthToken = System.getenv("MODRINTH_TOKEN")
var changelogEnv = System.getenv("CHANGELOG")
var versionNameEnv = System.getenv("NAME")
if (modrinthToken == null || changelogEnv == null) {
throw new RuntimeException("Didn't find correct env variables")
}

token = modrinthToken
// An environment property called MODRINTH that is your token, set via Gradle CLI, GitHub Actions, Idea Run Configuration, or other
projectId = project.modrinth_project
uploadFile = remapJar

addLoader('fabric')
addGameVersion(project.minecraft_version)

versionNumber = project.mod_version
versionName = versionNameEnv
changelog = changelogEnv
}
modrinth {
token = System.getenv("MODRINTH_TOKEN") // Remember to have the MODRINTH_TOKEN environment variable set or else this will fail - just make sure it stays private!
projectId = project.modrinth_project // This can be the project ID or the slug. Either will work!
versionNumber = project.mod_version // You don't need to set this manually. Will fail if Modrinth has this version already
versionName = System.getenv("NAME")
versionType = "release" // This is the default -- can also be `beta` or `alpha`
changelog = System.getenv("CHANGELOG")
uploadFile = remapJar // With Loom, this MUST be set to `remapJar` instead of `jar`!
gameVersions = ["1.20.2", "1.20.3", "1.20.4"] // Must be an array, even with only one version
loaders = ["fabric"] // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
dependencies { // A special DSL for creating dependencies
// scope.type
// The scope can be `required`, `optional`, `incompatible`, or `embedded`
// The type can either be `project` or `version`
required.project "fabric-api" // Creates a new required dependency on Fabric API
}
}


tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.14.22
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.3

# Mod Properties
mod_version = 1.5.0
Expand All @@ -16,5 +16,5 @@ org.gradle.jvmargs=-Xmx1G

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.88.1+1.20.1
fabric_version=0.93.1+1.20.4
autoconfig_version=3.3.1
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading