Skip to content

Commit ef5f07b

Browse files
authored
add option to strip forge requirements (#101)
1 parent 5be791b commit ef5f07b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ propertyDefaultIfUnset("gradleTokenVersion", "")
7878
propertyDefaultIfUnset("useSrcApiPath", false)
7979
propertyDefaultIfUnset("includeWellKnownRepositories", true)
8080
propertyDefaultIfUnset("includeCommonDevEnvMods", true)
81+
propertyDefaultIfUnset("stripForgeRequirements", false)
8182
propertyDefaultIfUnset("noPublishedSources", false)
8283
propertyDefaultIfUnset("forceEnableMixins", false)
8384
propertyDefaultIfUnsetWithEnvVar("enableCoreModDebug", false, "CORE_MOD_DEBUG")
@@ -567,6 +568,10 @@ dependencies {
567568
transitive = false
568569
}
569570

571+
if ((usesMixins.toBoolean() || forceEnableMixins.toBoolean()) && stripForgeRequirements.toBoolean()) {
572+
runtimeOnlyNonPublishable 'com.cleanroommc:strip-latest-forge-requirements:1.0'
573+
}
574+
570575
if (includeCommonDevEnvMods.toBoolean()) {
571576
if (!(modId.equals('jei'))) {
572577
implementation 'mezz.jei:jei_1.12.2:4.16.1.302'

gradle.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ includeWellKnownRepositories = true
9191
# Overrides the above setting to be always true, as these repositories are needed to fetch the mods
9292
includeCommonDevEnvMods = true
9393

94+
# Some mods require a specific forge version to launch in. When you need to use one of those mods as a dependency,
95+
# and cannot launch with the forge version required, enable this to strip the forge version requirements from that mod.
96+
# This will add 'strip-latest-forge-requirements' as 'runtimeOnlyNonPublishable'.
97+
# Requires useMixins or forceEnableMixins to be true, as the mod uses mixins to function.
98+
stripForgeRequirements = false
99+
94100

95101
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
96102
# responsibility check the licence and request permission for distribution, if required.

0 commit comments

Comments
 (0)