handle all version(s) as strings, and change java to 1.7

This commit is contained in:
Connor Tumbleson 2013-05-02 12:56:18 -05:00
parent ccb76e1abb
commit be73563c43
3 changed files with 19 additions and 20 deletions

View File

@ -361,8 +361,8 @@ final public class AndrolibResources {
public void setVersionInfo(Map<String, String> map) { public void setVersionInfo(Map<String, String> map) {
if (map != null) { if (map != null) {
mVersionCode = map.get("versionCode"); mVersionCode = map.get("versionCode").toString();
mVersionName = map.get("versionName"); mVersionName = map.get("versionName").toString();
} }
} }
@ -712,7 +712,6 @@ final public class AndrolibResources {
out = new ZipArchiveOutputStream(new FileOutputStream(outFile)); out = new ZipArchiveOutputStream(new FileOutputStream(outFile));
out.setMethod(ZipOutputStream.STORED); out.setMethod(ZipOutputStream.STORED);
CRC32 crc = new CRC32(); CRC32 crc = new CRC32();
crc.update(data); crc.update(data);
entry = new ZipArchiveEntry("resources.arsc"); entry = new ZipArchiveEntry("resources.arsc");

View File

@ -96,9 +96,9 @@ public class XmlPullStreamDecoder implements ResStreamDecoder {
if (pp.getAttributeName(i).equalsIgnoreCase(("package"))) { if (pp.getAttributeName(i).equalsIgnoreCase(("package"))) {
restable.addPackageInfo("orig_package",pp.getAttributeValue(i)); restable.addPackageInfo("orig_package",pp.getAttributeValue(i));
} else if (pp.getAttributeName(i).equalsIgnoreCase("versionCode")) { } else if (pp.getAttributeName(i).equalsIgnoreCase("versionCode")) {
restable.addVersionInfo("versionCode", pp.getAttributeValue(i)); restable.addVersionInfo("versionCode", pp.getAttributeValue(i).toString());
} else if (pp.getAttributeName(i).equalsIgnoreCase("versionName")) { } else if (pp.getAttributeName(i).equalsIgnoreCase("versionName")) {
restable.addVersionInfo("versionName", pp.getAttributeValue(i)); restable.addVersionInfo("versionName", pp.getAttributeValue(i).toString());
} }
} }
return true; return true;

View File

@ -25,8 +25,8 @@ repositories {
mavenCentral() mavenCentral()
} }
sourceCompatibility = 1.6 sourceCompatibility = 1.7
targetCompatibility = 1.6 targetCompatibility = 1.7
class Compatibility { class Compatibility {
String version String version