Skip to content

Commit

Permalink
style: cleanup build vs Build
Browse files Browse the repository at this point in the history
  • Loading branch information
iBotPeaches committed Sep 6, 2021
1 parent 0f690e4 commit 9bdf385
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private static void cmdBuild(CommandLine cli) {
String[] args = cli.getArgs();
String appDirName = args.length < 2 ? "." : args[1];
File outFile;
brut.androlib.options.BuildOptions buildOptions = new BuildOptions();
BuildOptions buildOptions = new BuildOptions();

// check for build options
if (cli.hasOption("f") || cli.hasOption("force-all")) {
Expand Down Expand Up @@ -463,38 +463,38 @@ private static void _Options() {

// check for advance mode
if (isAdvanceMode()) {
DecodeOptions.addOption(noDbgOption);
DecodeOptions.addOption(keepResOption);
DecodeOptions.addOption(analysisOption);
DecodeOptions.addOption(onlyMainClassesOption);
DecodeOptions.addOption(apiLevelOption);
DecodeOptions.addOption(noAssetOption);
DecodeOptions.addOption(forceManOption);

BuildOptions.addOption(apiLevelOption);
BuildOptions.addOption(debugBuiOption);
BuildOptions.addOption(aaptOption);
BuildOptions.addOption(originalOption);
BuildOptions.addOption(aapt2Option);
BuildOptions.addOption(noCrunchOption);
decodeOptions.addOption(noDbgOption);
decodeOptions.addOption(keepResOption);
decodeOptions.addOption(analysisOption);
decodeOptions.addOption(onlyMainClassesOption);
decodeOptions.addOption(apiLevelOption);
decodeOptions.addOption(noAssetOption);
decodeOptions.addOption(forceManOption);

buildOptions.addOption(apiLevelOption);
buildOptions.addOption(debugBuiOption);
buildOptions.addOption(aaptOption);
buildOptions.addOption(originalOption);
buildOptions.addOption(aapt2Option);
buildOptions.addOption(noCrunchOption);
}

// add global options
normalOptions.addOption(versionOption);
normalOptions.addOption(advanceOption);

// add basic decode options
DecodeOptions.addOption(frameTagOption);
DecodeOptions.addOption(outputDecOption);
DecodeOptions.addOption(frameDirOption);
DecodeOptions.addOption(forceDecOption);
DecodeOptions.addOption(noSrcOption);
DecodeOptions.addOption(noResOption);
decodeOptions.addOption(frameTagOption);
decodeOptions.addOption(outputDecOption);
decodeOptions.addOption(frameDirOption);
decodeOptions.addOption(forceDecOption);
decodeOptions.addOption(noSrcOption);
decodeOptions.addOption(noResOption);

// add basic build options
BuildOptions.addOption(outputBuiOption);
BuildOptions.addOption(frameDirOption);
BuildOptions.addOption(forceBuiOption);
buildOptions.addOption(outputBuiOption);
buildOptions.addOption(frameDirOption);
buildOptions.addOption(forceBuiOption);

// add basic framework options
frameOptions.addOption(tagOption);
Expand All @@ -511,10 +511,10 @@ private static void _Options() {
for (Option op : normalOptions.getOptions()) {
allOptions.addOption(op);
}
for (Option op : DecodeOptions.getOptions()) {
for (Option op : decodeOptions.getOptions()) {
allOptions.addOption(op);
}
for (Option op : BuildOptions.getOptions()) {
for (Option op : buildOptions.getOptions()) {
allOptions.addOption(op);
}
for (Option op : frameOptions.getOptions()) {
Expand Down Expand Up @@ -566,8 +566,8 @@ private static void usage() {
// 4 usage outputs (general, frameworks, decode, build)
formatter.printHelp("apktool " + verbosityHelp(), normalOptions);
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() + "b[uild] [options] <app_path>", BuildOptions);
formatter.printHelp("apktool " + verbosityHelp() + "d[ecode] [options] <file_apk>", decodeOptions);
formatter.printHelp("apktool " + verbosityHelp() + "b[uild] [options] <app_path>", buildOptions);
if (isAdvanceMode()) {
formatter.printHelp("apktool " + verbosityHelp() + "publicize-resources <file_path>", emptyOptions);
formatter.printHelp("apktool " + verbosityHelp() + "empty-framework-dir [options]", emptyFrameworkOptions);
Expand Down Expand Up @@ -654,8 +654,8 @@ private enum Verbosity {
private static boolean advanceMode = false;

private final static Options normalOptions;
private final static Options DecodeOptions;
private final static Options BuildOptions;
private final static Options decodeOptions;
private final static Options buildOptions;
private final static Options frameOptions;
private final static Options allOptions;
private final static Options emptyOptions;
Expand All @@ -665,8 +665,8 @@ private enum Verbosity {
static {
//normal and advance usage output
normalOptions = new Options();
BuildOptions = new Options();
DecodeOptions = new Options();
buildOptions = new Options();
decodeOptions = new Options();
frameOptions = new Options();
allOptions = new Options();
emptyOptions = new Options();
Expand Down

0 comments on commit 9bdf385

Please sign in to comment.