unify smali/baksmali/apktool properties into one folder

This commit is contained in:
Connor Tumbleson
2012-09-20 19:28:24 -05:00
parent 7e6ad41830
commit dd881e21d1
7 changed files with 32 additions and 34 deletions

View File

@ -39,8 +39,7 @@ public class ApktoolProperties {
}
private static void loadProps() {
InputStream in = ApktoolProperties.class
.getResourceAsStream("apktool.properties");
InputStream in = main.class.getResourceAsStream("/properties/apktool.properties");
sProps = new Properties();
try {
sProps.load(in);
@ -49,7 +48,7 @@ public class ApktoolProperties {
LOGGER.warning("Can't load properties.");
}
InputStream templateStream = baksmali.class.getClassLoader().getResourceAsStream("properties/baksmali.properties");
InputStream templateStream = main.class.getClassLoader().getResourceAsStream("/properties/baksmali.properties");
Properties properties = new Properties();
String version = "(unknown)";
try {
@ -58,7 +57,7 @@ public class ApktoolProperties {
} catch (IOException ex) {
}
sProps.put("baksmaliVersion", version);
templateStream = main.class.getClassLoader().getResourceAsStream("smali.properties");
templateStream = main.class.getClassLoader().getResourceAsStream("/properties/smali.properties");
properties = new Properties();
version = "(unknown)";
try {

View File

@ -417,8 +417,7 @@ final public class AndrolibResources {
InputStream in = null;
OutputStream out = null;
try {
in = AndrolibResources.class.getResourceAsStream(
"/brut/androlib/android-framework.jar");
in = AndrolibResources.class.getResourceAsStream("brut/androlib/android-framework.jar");
out = new FileOutputStream(apk);
IOUtils.copy(in, out);
return apk;

View File

@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package brut.androlib;
import brut.androlib.res.util.ExtFile;