Skip to content

Commit

Permalink
I forgot the most important part
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Dec 7, 2024
1 parent c120a98 commit c0dc658
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/xyz/wagyourtail/jvmdg/cli/Flags.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public Flags copy() {
flags.allowMaven = allowMaven;
flags.ignoreWarningsIn = new TreeMap<>(ignoreWarningsIn);
flags.printDebug = printDebug;
flags.debugSkipStub = new HashSet<>(debugSkipStub);
flags.debugSkipStubs = new HashSet<>(debugSkipStubs);
flags.debugDumpClasses = debugDumpClasses;
flags.multiReleaseOriginal = multiReleaseOriginal;
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/xyz/wagyourtail/jvmdg/cli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import xyz.wagyourtail.jvmdg.compile.ZipDowngrader;
import xyz.wagyourtail.jvmdg.logging.Logger;
import xyz.wagyourtail.jvmdg.util.Utils;
import xyz.wagyourtail.jvmdg.version.map.FullyQualifiedMemberNameAndDesc;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -38,6 +39,7 @@ public static void main(String[] args) throws IOException, ClassNotFoundExceptio
new Arguments("--multiRelease", "Use semi-downgraded files for a Multi-Release jar, versions as class version (ex. \"55\" for java 11)", new String[]{"-mr"}, new String[]{"version"}),
new Arguments("debug", "Set debug flags/call debug actions", null, null).addChildren(
new Arguments("--print", "[Deprecated] Enable printing debug info", new String[]{"-p"}, null),
new Arguments("--skipStub", "Skip a specific class/method, of form \"Lcom/example/ClassName;\" or \"Lcom/example/ClassName;methodName;()V\"", new String[] {"-ss"}, new String[] {"stub"}),
new Arguments("--skipStubs", "Skip method/class stubs for these class versions", new String[]{"-s"}, new String[]{"versions"}),
new Arguments("--dumpClasses", "Dump classes to the debug folder", new String[]{"-d"}, null),
new Arguments("downgradeApi", "Retrieves and downgrades the java api jar", null, new String[]{"outputPath"})
Expand Down Expand Up @@ -185,6 +187,12 @@ public static void debug(Map<String, List<String[]>> args) throws IOException {
case "--dumpClasses":
flags.debugDumpClasses = true;
break;
case "--skipStub":
for (String[] s : entry.getValue()) {
for (String string : s) {
flags.debugSkipStub.add(FullyQualifiedMemberNameAndDesc.of(string));
}
}
case "--skipStubs":
for (String[] s : entry.getValue()) {
for (String string : s) {
Expand Down

0 comments on commit c0dc658

Please sign in to comment.