mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-05 02:22:55 +01:00
handle all version(s) as strings, and change java to 1.7
This commit is contained in:
parent
ccb76e1abb
commit
be73563c43
@ -361,8 +361,8 @@ final public class AndrolibResources {
|
||||
|
||||
public void setVersionInfo(Map<String, String> map) {
|
||||
if (map != null) {
|
||||
mVersionCode = map.get("versionCode");
|
||||
mVersionName = map.get("versionName");
|
||||
mVersionCode = map.get("versionCode").toString();
|
||||
mVersionName = map.get("versionName").toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -712,7 +712,6 @@ final public class AndrolibResources {
|
||||
|
||||
out = new ZipArchiveOutputStream(new FileOutputStream(outFile));
|
||||
out.setMethod(ZipOutputStream.STORED);
|
||||
|
||||
CRC32 crc = new CRC32();
|
||||
crc.update(data);
|
||||
entry = new ZipArchiveEntry("resources.arsc");
|
||||
|
@ -87,22 +87,22 @@ public class XmlPullStreamDecoder implements ResStreamDecoder {
|
||||
super.event(pp);
|
||||
}
|
||||
|
||||
private boolean parseManifest(XmlPullParser pp)
|
||||
throws AndrolibException {
|
||||
ResTable restable = resTable;
|
||||
private boolean parseManifest(XmlPullParser pp)
|
||||
throws AndrolibException {
|
||||
ResTable restable = resTable;
|
||||
|
||||
// read <manifest> for package:
|
||||
for (int i = 0; i < pp.getAttributeCount(); i++) {
|
||||
if (pp.getAttributeName(i).equalsIgnoreCase(("package"))) {
|
||||
restable.addPackageInfo("orig_package",pp.getAttributeValue(i));
|
||||
} else if (pp.getAttributeName(i).equalsIgnoreCase("versionCode")) {
|
||||
restable.addVersionInfo("versionCode", pp.getAttributeValue(i));
|
||||
} else if (pp.getAttributeName(i).equalsIgnoreCase("versionName")) {
|
||||
restable.addVersionInfo("versionName", pp.getAttributeValue(i));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// read <manifest> for package:
|
||||
for (int i = 0; i < pp.getAttributeCount(); i++) {
|
||||
if (pp.getAttributeName(i).equalsIgnoreCase(("package"))) {
|
||||
restable.addPackageInfo("orig_package",pp.getAttributeValue(i));
|
||||
} else if (pp.getAttributeName(i).equalsIgnoreCase("versionCode")) {
|
||||
restable.addVersionInfo("versionCode", pp.getAttributeValue(i).toString());
|
||||
} else if (pp.getAttributeName(i).equalsIgnoreCase("versionName")) {
|
||||
restable.addVersionInfo("versionName", pp.getAttributeValue(i).toString());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean parseAttr(XmlPullParser pp)
|
||||
throws AndrolibException {
|
||||
|
@ -25,8 +25,8 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
sourceCompatibility = 1.7
|
||||
targetCompatibility = 1.7
|
||||
|
||||
class Compatibility {
|
||||
String version
|
||||
|
Loading…
Reference in New Issue
Block a user