Skip to content

Commit

Permalink
Support Forge
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Aug 13, 2024
1 parent 474a0dd commit 136aab6
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion 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.6-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.7-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
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")
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.20.5", "Java 21"
gameVersions.addAll "1.20.5", "1.20.6", "Java 21"
}
}

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 "1.20.5", project.minecraft_version
}
}
}
Expand Down
11 changes: 8 additions & 3 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ dependencies {
modLocalRuntime("me.shedaniel.cloth:basic-math:0.6.1")
forgeDependencies(shadowCommon("me.shedaniel.cloth:basic-math:0.6.1"))

forgeDependencies("cpw.mods:securejarhandler:0.9.48")
modLocalRuntime("blue.endless:jankson:${rootProject.jankson_version}")
modLocalRuntime("com.moandjiezana.toml:toml4j:${rootProject.toml4j_version}")
modLocalRuntime("com.moandjiezana.toml:toml4j:${rootProject.toml4j_version}") {
exclude(module: "gson")
}
modLocalRuntime("org.yaml:snakeyaml:${rootProject.snakeyaml_version}")
forgeDependencies(shadowCommon("blue.endless:jankson:${rootProject.jankson_version}"))
forgeDependencies(shadowCommon("com.moandjiezana.toml:toml4j:${rootProject.toml4j_version}") {
Expand All @@ -49,6 +50,10 @@ dependencies {
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive false }
}

configurations.configureEach {
resolutionStrategy.force("net.sf.jopt-simple:jopt-simple:5.0.4")
}

processResources {
filesMatching("META-INF/mods.toml") {
expand "version": project.version
Expand Down Expand Up @@ -100,7 +105,7 @@ unifiedPublishing {
project {
displayName = "[MinecraftForge $rootProject.supported_version] v$project.version"
releaseType = "release"
gameVersions = ["1.20.3", "1.20.4"]
gameVersions = ["1.20.5", "1.20.6"]
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.20.5
supported_version=1.20.5
minecraft_version=1.20.6
supported_version=1.20.5/6

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.15.10
fabric_api_version=0.97.6+1.20.5
mod_menu_version=10.0.0-beta.1
fabric_loader_version=0.16.0
fabric_api_version=0.100.4+1.20.6
mod_menu_version=10.0.0

forge_version=49.0.3
neoforge_version=20.5.0-beta
forge_version=50.1.12
neoforge_version=20.6.119
neoforge_pr=

curseforge_id=348521
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
2 changes: 1 addition & 1 deletion neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ unifiedPublishing {
project {
displayName = "[NeoForge $rootProject.supported_version] v$project.version"
releaseType = "release"
gameVersions = ["1.20.5"]
gameVersions = ["1.20.5", "1.20.6"]
gameLoaders = ["neoforge"]

mainPublication remapJar
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ pluginManagement {
repositories {
maven { url "https://maven.fabricmc.net/" }
maven { url "https://maven.architectury.dev/" }
gradlePluginPortal()
maven { url "https://files.minecraftforge.net/maven/" }
maven { url "https://jitpack.io" }
gradlePluginPortal()
}
}

Expand All @@ -14,7 +14,7 @@ if (JavaVersion.current().ordinal() + 1 < 21) {

include("common")
include("fabric")
//include("forge")
include("forge")
include("neoforge")

rootProject.name = 'cloth-config'

0 comments on commit 136aab6

Please sign in to comment.