-
-
Notifications
You must be signed in to change notification settings - Fork 442
[7.0] Display a warning if Renamer is not present using legacy Forge versions #1071
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
base: FG_7.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,6 +96,28 @@ void reportMissingMinecraftDependency() { | |
| ); | ||
| } | ||
|
|
||
| void reportMissingRenamerPluginForOldVersion(Dependency dependency) { | ||
| if (this.testFalse("net.minecraftforge.gradle.warnings.minecraft.legacy.renamer.missing")) return; | ||
|
|
||
| LOGGER.warn("WARNING: Renamer Gradle not present with legacy Forge version. See Problems report for details."); | ||
| this.report("legacy-missing-renamer", "Missing Renamer Gradle for legacy Minecraft dependency", spec -> spec | ||
| .details(""" | ||
| A legacy Forge dependency was declared, but Renamer Gradle has not been applied to the project! | ||
| While the workspace will continue to function, this may cause problems with resultant artifacts not being renamed to obfuscated mappings. | ||
| Legacy Forge versions use obfuscated mappings at runtime, so this is a requirement if you are publishing this project as a mod that uses Minecraft names. | ||
| Dependency: '%s'""" | ||
| .formatted(Util.toString(dependency))) | ||
| .severity(Severity.WARNING) | ||
| .solution("Apply the 'net.minecraftforge.renamer' plugin.") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mention looking at the MDK Examples repo as applying the plugin alone doesn't fix built jars iirc |
||
| .solution("Disable this warning in 'gradle.properties' if you are an advanced user: `net.minecraftforge.gradle.warnings.minecraft.legacy.renamer.missing=false`") | ||
| .solution("Consider building your project for a newer version of Forge targeting Minecraft 1.20.5 or newer.") | ||
| .solution(HELP_MESSAGE)); | ||
| } | ||
|
|
||
| void reportMissingRenamerCheckFailed(Dependency dependency, Throwable e) { | ||
| LOGG | ||
|
Comment on lines
+117
to
+118
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Possible typo?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no way, i forgot to finish that method. awesome. |
||
| } | ||
|
|
||
| RuntimeException invalidMinecraftDependencyType(Dependency dependency) { | ||
| return this.throwing(new IllegalArgumentException("Minecraft dependency is not a module dependency"), "unsupported-minecraft-dependency-type", "Non-module dependency used as Minecraft dependency", spec -> spec | ||
| .details(""" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something something "while your mod will work in dev, the built jar won't work in production without the renamer plugin applied and reobf used on it"