Skip to content

Commit

Permalink
add option to strip forge requirements (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
WaitingIdly authored Jul 4, 2024
1 parent 5be791b commit ef5f07b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ propertyDefaultIfUnset("gradleTokenVersion", "")
propertyDefaultIfUnset("useSrcApiPath", false)
propertyDefaultIfUnset("includeWellKnownRepositories", true)
propertyDefaultIfUnset("includeCommonDevEnvMods", true)
propertyDefaultIfUnset("stripForgeRequirements", false)
propertyDefaultIfUnset("noPublishedSources", false)
propertyDefaultIfUnset("forceEnableMixins", false)
propertyDefaultIfUnsetWithEnvVar("enableCoreModDebug", false, "CORE_MOD_DEBUG")
Expand Down Expand Up @@ -567,6 +568,10 @@ dependencies {
transitive = false
}

if ((usesMixins.toBoolean() || forceEnableMixins.toBoolean()) && stripForgeRequirements.toBoolean()) {
runtimeOnlyNonPublishable 'com.cleanroommc:strip-latest-forge-requirements:1.0'
}

if (includeCommonDevEnvMods.toBoolean()) {
if (!(modId.equals('jei'))) {
implementation 'mezz.jei:jei_1.12.2:4.16.1.302'
Expand Down
6 changes: 6 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ includeWellKnownRepositories = true
# Overrides the above setting to be always true, as these repositories are needed to fetch the mods
includeCommonDevEnvMods = true

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


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

0 comments on commit ef5f07b

Please sign in to comment.