style: cleanup build vs Build

This commit is contained in:
Connor Tumbleson 2021-09-05 07:23:58 -04:00 committed by Connor Tumbleson
parent 0f690e4654
commit 9bdf385538

View File

@ -207,7 +207,7 @@ public class Main {
String[] args = cli.getArgs(); String[] args = cli.getArgs();
String appDirName = args.length < 2 ? "." : args[1]; String appDirName = args.length < 2 ? "." : args[1];
File outFile; File outFile;
brut.androlib.options.BuildOptions buildOptions = new BuildOptions(); BuildOptions buildOptions = new BuildOptions();
// check for build options // check for build options
if (cli.hasOption("f") || cli.hasOption("force-all")) { if (cli.hasOption("f") || cli.hasOption("force-all")) {
@ -463,20 +463,20 @@ public class Main {
// check for advance mode // check for advance mode
if (isAdvanceMode()) { if (isAdvanceMode()) {
DecodeOptions.addOption(noDbgOption); decodeOptions.addOption(noDbgOption);
DecodeOptions.addOption(keepResOption); decodeOptions.addOption(keepResOption);
DecodeOptions.addOption(analysisOption); decodeOptions.addOption(analysisOption);
DecodeOptions.addOption(onlyMainClassesOption); decodeOptions.addOption(onlyMainClassesOption);
DecodeOptions.addOption(apiLevelOption); decodeOptions.addOption(apiLevelOption);
DecodeOptions.addOption(noAssetOption); decodeOptions.addOption(noAssetOption);
DecodeOptions.addOption(forceManOption); decodeOptions.addOption(forceManOption);
BuildOptions.addOption(apiLevelOption); buildOptions.addOption(apiLevelOption);
BuildOptions.addOption(debugBuiOption); buildOptions.addOption(debugBuiOption);
BuildOptions.addOption(aaptOption); buildOptions.addOption(aaptOption);
BuildOptions.addOption(originalOption); buildOptions.addOption(originalOption);
BuildOptions.addOption(aapt2Option); buildOptions.addOption(aapt2Option);
BuildOptions.addOption(noCrunchOption); buildOptions.addOption(noCrunchOption);
} }
// add global options // add global options
@ -484,17 +484,17 @@ public class Main {
normalOptions.addOption(advanceOption); normalOptions.addOption(advanceOption);
// add basic decode options // add basic decode options
DecodeOptions.addOption(frameTagOption); decodeOptions.addOption(frameTagOption);
DecodeOptions.addOption(outputDecOption); decodeOptions.addOption(outputDecOption);
DecodeOptions.addOption(frameDirOption); decodeOptions.addOption(frameDirOption);
DecodeOptions.addOption(forceDecOption); decodeOptions.addOption(forceDecOption);
DecodeOptions.addOption(noSrcOption); decodeOptions.addOption(noSrcOption);
DecodeOptions.addOption(noResOption); decodeOptions.addOption(noResOption);
// add basic build options // add basic build options
BuildOptions.addOption(outputBuiOption); buildOptions.addOption(outputBuiOption);
BuildOptions.addOption(frameDirOption); buildOptions.addOption(frameDirOption);
BuildOptions.addOption(forceBuiOption); buildOptions.addOption(forceBuiOption);
// add basic framework options // add basic framework options
frameOptions.addOption(tagOption); frameOptions.addOption(tagOption);
@ -511,10 +511,10 @@ public class Main {
for (Option op : normalOptions.getOptions()) { for (Option op : normalOptions.getOptions()) {
allOptions.addOption(op); allOptions.addOption(op);
} }
for (Option op : DecodeOptions.getOptions()) { for (Option op : decodeOptions.getOptions()) {
allOptions.addOption(op); allOptions.addOption(op);
} }
for (Option op : BuildOptions.getOptions()) { for (Option op : buildOptions.getOptions()) {
allOptions.addOption(op); allOptions.addOption(op);
} }
for (Option op : frameOptions.getOptions()) { for (Option op : frameOptions.getOptions()) {
@ -566,8 +566,8 @@ public class Main {
// 4 usage outputs (general, frameworks, decode, build) // 4 usage outputs (general, frameworks, decode, build)
formatter.printHelp("apktool " + verbosityHelp(), normalOptions); formatter.printHelp("apktool " + verbosityHelp(), normalOptions);
formatter.printHelp("apktool " + verbosityHelp() + "if|install-framework [options] <framework.apk>", frameOptions); formatter.printHelp("apktool " + verbosityHelp() + "if|install-framework [options] <framework.apk>", frameOptions);
formatter.printHelp("apktool " + verbosityHelp() + "d[ecode] [options] <file_apk>", DecodeOptions); formatter.printHelp("apktool " + verbosityHelp() + "d[ecode] [options] <file_apk>", decodeOptions);
formatter.printHelp("apktool " + verbosityHelp() + "b[uild] [options] <app_path>", BuildOptions); formatter.printHelp("apktool " + verbosityHelp() + "b[uild] [options] <app_path>", buildOptions);
if (isAdvanceMode()) { if (isAdvanceMode()) {
formatter.printHelp("apktool " + verbosityHelp() + "publicize-resources <file_path>", emptyOptions); formatter.printHelp("apktool " + verbosityHelp() + "publicize-resources <file_path>", emptyOptions);
formatter.printHelp("apktool " + verbosityHelp() + "empty-framework-dir [options]", emptyFrameworkOptions); formatter.printHelp("apktool " + verbosityHelp() + "empty-framework-dir [options]", emptyFrameworkOptions);
@ -654,8 +654,8 @@ public class Main {
private static boolean advanceMode = false; private static boolean advanceMode = false;
private final static Options normalOptions; private final static Options normalOptions;
private final static Options DecodeOptions; private final static Options decodeOptions;
private final static Options BuildOptions; private final static Options buildOptions;
private final static Options frameOptions; private final static Options frameOptions;
private final static Options allOptions; private final static Options allOptions;
private final static Options emptyOptions; private final static Options emptyOptions;
@ -665,8 +665,8 @@ public class Main {
static { static {
//normal and advance usage output //normal and advance usage output
normalOptions = new Options(); normalOptions = new Options();
BuildOptions = new Options(); buildOptions = new Options();
DecodeOptions = new Options(); decodeOptions = new Options();
frameOptions = new Options(); frameOptions = new Options();
allOptions = new Options(); allOptions = new Options();
emptyOptions = new Options(); emptyOptions = new Options();