Skip to content

Commit

Permalink
Add --inferNameFromSameLvIndex cli arg (#134)
Browse files Browse the repository at this point in the history
* Update Gradle

allows running on Java 22

* Add --inferNameFromSameLvIndex
  • Loading branch information
claiwe authored Oct 15, 2024
1 parent dba9f1f commit 3c390d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/net/fabricmc/tinyremapper/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static void main(String[] rawArgs) {
boolean skipLocalVariableMapping = false;
boolean renameInvalidLocals = false;
Pattern invalidLvNamePattern = null;
boolean inferNameFromSameLvIndex = false;
NonClassCopyMode ncCopyMode = NonClassCopyMode.FIX_META_INF;
int threads = -1;
boolean enableMixin = false;
Expand Down Expand Up @@ -118,6 +119,9 @@ public static void main(String[] rawArgs) {
case "invalidlvnamepattern":
invalidLvNamePattern = Pattern.compile(arg.substring(valueSepPos + 1));
break;
case "infernamefromsamelvindex":
inferNameFromSameLvIndex = true;
break;
case "nonclasscopymode":
switch (arg.substring(valueSepPos + 1).toLowerCase(Locale.ENGLISH)) {
case "unchanged": ncCopyMode = NonClassCopyMode.UNCHANGED; break;
Expand Down Expand Up @@ -248,6 +252,7 @@ public static void main(String[] rawArgs) {
.skipLocalVariableMapping(skipLocalVariableMapping)
.renameInvalidLocals(renameInvalidLocals)
.invalidLvNamePattern(invalidLvNamePattern)
.inferNameFromSameLvIndex(inferNameFromSameLvIndex)
.threads(threads);

if (enableMixin) {
Expand Down

0 comments on commit 3c390d8

Please sign in to comment.