Skip to content

Commit

Permalink
Support MinecraftForge
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Dec 12, 2024
1 parent 64d72a3 commit 28d2a9a
Show file tree
Hide file tree
Showing 11 changed files with 261 additions and 164 deletions.
9 changes: 6 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.9-SNAPSHOT" apply false
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
id "maven-publish"
id "org.cadixdev.licenser" version "0.6.1" apply false
Expand Down Expand Up @@ -38,11 +38,14 @@ allprojects {
def runNumber = (System.getenv("GITHUB_RUN_NUMBER") == null ? "9999" : System.getenv("GITHUB_RUN_NUMBER"))

version = rootProject.base_version + "." + runNumber
archivesBaseName = rootProject.archives_base_name

base {
archivesName = rootProject.archives_base_name
}

group = rootProject.maven_group

tasks.withType(JavaCompile) {
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"

// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
}

architectury {
common("fabric", "neoforge"/*, "forge", "neoforge"*/)
common("fabric", "forge", "neoforge")
}

task sourcesJar(type: Jar, dependsOn: classes) {
Expand Down
4 changes: 2 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ unifiedPublishing {
curseforge {
token = project.hasProperty("curse_api_key") ? project.property("curse_api_key") : System.getenv("curse_api_key")
id = project.curseforge_id
gameVersions.addAll "1.21.2-Snapshot", "Java 21", "1.21.2"
gameVersions.addAll "1.21.2-Snapshot", "Java 21", "1.21.2", "1.21.3"
}
}

Expand All @@ -130,7 +130,7 @@ unifiedPublishing {
token = project.hasProperty("modrinth_key") ? project.property("modrinth_key") : System.getenv("modrinth_key")
id = project.modrinth_id
version = "$project.version+$project.name"
gameVersions.addAll project.minecraft_version
gameVersions.addAll project.minecraft_version, "1.21.2"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ unifiedPublishing {
project {
displayName = "[MinecraftForge $rootProject.supported_version] v$project.version"
releaseType = "release"
gameVersions = ["1.21"]
gameVersions = ["1.21.2", "1.21.3"]
gameLoaders = ["forge"]

mainPublication remapJar
Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

minecraft_version=1.21.2
supported_version=1.21.2
minecraft_version=1.21.3
supported_version=1.21.2/3

archives_base_name=cloth-config
archives_base_name_snapshot=cloth-config-snapshot
Expand All @@ -13,12 +13,12 @@ jankson_version=1.2.0
toml4j_version=0.7.2
snakeyaml_version=1.27

fabric_loader_version=0.16.7
fabric_api_version=0.106.1+1.21.2
mod_menu_version=12.0.0-beta.1
fabric_loader_version=0.16.9
fabric_api_version=0.110.0+1.21.3
mod_menu_version=12.0.0

forge_version=51.0.33
neoforge_version=21.2.0-beta
forge_version=53.0.25
neoforge_version=21.3.58
neoforge_pr=

curseforge_id=348521
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Sun Dec 30 21:50:18 HKT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
Loading

0 comments on commit 28d2a9a

Please sign in to comment.