diff --git a/baksmali/src/main/java/org/jf/baksmali/baksmaliHelpFormatter.java b/baksmali/src/main/java/org/jf/baksmali/baksmaliHelpFormatter.java deleted file mode 100644 index 65da8db0..00000000 --- a/baksmali/src/main/java/org/jf/baksmali/baksmaliHelpFormatter.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * [The "BSD licence"] - * Copyright (c) 2010 Ben Gruver (JesusFreke) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package org.jf.baksmali; - -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Options; - -public class baksmaliHelpFormatter extends HelpFormatter { - - public void baksmaliHelpFormatter() { - } - - public void renderOptions(StringBuffer sb, Options options) { - super.renderOptions(sb, getWidth(), options, getLeftPadding(), this.getDescPadding()); - } -} diff --git a/baksmali/src/main/java/org/jf/baksmali/main.java b/baksmali/src/main/java/org/jf/baksmali/main.java index 35110eb7..4ad5fd44 100644 --- a/baksmali/src/main/java/org/jf/baksmali/main.java +++ b/baksmali/src/main/java/org/jf/baksmali/main.java @@ -30,7 +30,7 @@ package org.jf.baksmali; import org.apache.commons.cli.*; import org.jf.dexlib.DexFile; -import org.jf.util.ConsoleUtil; +import org.jf.util.*; import java.io.File; import java.io.InputStream; @@ -294,7 +294,7 @@ public class main { * Prints the usage message. */ private static void usage(boolean printDebugOptions) { - baksmaliHelpFormatter formatter = new baksmaliHelpFormatter(); + smaliHelpFormatter formatter = new smaliHelpFormatter(); formatter.setWidth(ConsoleUtil.getConsoleWidth()); formatter.printHelp("java -jar baksmali.jar [options] ", diff --git a/smali/src/main/java/org/jf/smali/main.java b/smali/src/main/java/org/jf/smali/main.java index 260167b3..ce03083c 100644 --- a/smali/src/main/java/org/jf/smali/main.java +++ b/smali/src/main/java/org/jf/smali/main.java @@ -31,18 +31,12 @@ package org.jf.smali; import org.apache.commons.cli.*; import org.jf.dexlib.DexFile; import org.jf.dexlib.CodeItem; -import org.jf.dexlib.Code.InstructionIterator; -import org.jf.dexlib.Code.Opcode; -import org.jf.dexlib.Code.Format.Format; import org.jf.dexlib.Util.ByteArrayAnnotatedOutput; -import org.jf.dexlib.Util.FileUtils; import org.antlr.runtime.ANTLRInputStream; import org.antlr.runtime.CommonTokenStream; -import org.antlr.runtime.TokenRewriteStream; -import org.antlr.runtime.Lexer; import org.antlr.runtime.tree.CommonTree; import org.antlr.runtime.tree.CommonTreeNodeStream; -import org.jf.util.ConsoleUtil; +import org.jf.util.*; import java.io.*; import java.util.Set; diff --git a/util/pom.xml b/util/pom.xml index e8ecb073..110d5cb4 100644 --- a/util/pom.xml +++ b/util/pom.xml @@ -10,4 +10,11 @@ smali-pom 1.0-SNAPSHOT + + + commons-cli + commons-cli + 1.2 + + \ No newline at end of file diff --git a/smali/src/main/java/org/jf/smali/smaliHelpFormatter.java b/util/src/main/java/org/jf/util/smaliHelpFormatter.java similarity index 98% rename from smali/src/main/java/org/jf/smali/smaliHelpFormatter.java rename to util/src/main/java/org/jf/util/smaliHelpFormatter.java index 873ed016..5783ec85 100644 --- a/smali/src/main/java/org/jf/smali/smaliHelpFormatter.java +++ b/util/src/main/java/org/jf/util/smaliHelpFormatter.java @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.jf.smali; +package org.jf.util; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options;