mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-05 17:45:52 +01:00
aapt2: flag for aapt2 and sparse resources to meta-info/apkOptions
This commit is contained in:
parent
0827b2b7a2
commit
f5caccbc2e
@ -27,9 +27,16 @@ public class ApkOptions {
|
||||
public boolean updateFiles = false;
|
||||
public boolean isFramework = false;
|
||||
public boolean resourcesAreCompressed = false;
|
||||
public boolean useAapt2 = false;
|
||||
public Collection<String> doNotCompress;
|
||||
|
||||
public String frameworkFolderLocation = null;
|
||||
public String frameworkTag = null;
|
||||
public String aaptPath = "";
|
||||
|
||||
public int aaptVersion = 1; // default to v1
|
||||
|
||||
public boolean isAapt2() {
|
||||
return this.useAapt2 || this.aaptVersion == 2;
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ public class MetaInfo {
|
||||
public VersionInfo versionInfo;
|
||||
public boolean compressionType;
|
||||
public boolean sharedLibrary;
|
||||
public boolean sparseResources;
|
||||
public Map<String, String> unknownFiles;
|
||||
public Collection<String> doNotCompress;
|
||||
|
||||
@ -60,7 +61,7 @@ public class MetaInfo {
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
|
||||
Writer writer = new BufferedWriter(outputStreamWriter)
|
||||
){
|
||||
) {
|
||||
save(writer);
|
||||
}
|
||||
}
|
||||
@ -72,7 +73,7 @@ public class MetaInfo {
|
||||
public static MetaInfo load(File file) throws IOException {
|
||||
try (
|
||||
InputStream fis = new FileInputStream(file)
|
||||
){
|
||||
) {
|
||||
return load(fis);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user