mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-07 18:45:58 +01:00
Correctly rebuild /libs & /lib folder on [b]uild
This commit is contained in:
parent
960d111a1e
commit
e407fe839b
@ -285,6 +285,7 @@ public class Androlib {
|
|||||||
buildResources(appDir, (Map<String, Object>) meta.get("usesFramework"));
|
buildResources(appDir, (Map<String, Object>) meta.get("usesFramework"));
|
||||||
|
|
||||||
buildLib(appDir);
|
buildLib(appDir);
|
||||||
|
buildLibs(appDir);
|
||||||
buildCopyOriginalFiles(appDir);
|
buildCopyOriginalFiles(appDir);
|
||||||
buildApk(appDir, outFile);
|
buildApk(appDir, outFile);
|
||||||
|
|
||||||
@ -516,15 +517,24 @@ public class Androlib {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void buildLib(File appDir)
|
public void buildLib(File appDir) throws AndrolibException {
|
||||||
throws AndrolibException {
|
buildLibrary(appDir, "lib");
|
||||||
File working = new File(appDir, "lib");
|
}
|
||||||
if (!working.exists()) {
|
|
||||||
|
public void buildLibs(File appDir) throws AndrolibException {
|
||||||
|
buildLibrary(appDir, "libs");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void buildLibrary(File appDir, String folder) throws AndrolibException {
|
||||||
|
File working = new File(appDir, folder);
|
||||||
|
|
||||||
|
if (! working.exists()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
File stored = new File(appDir, APK_DIRNAME + "/lib");
|
|
||||||
|
File stored = new File(appDir, APK_DIRNAME + "/" + folder);
|
||||||
if (apkOptions.forceBuildAll || isModified(working, stored)) {
|
if (apkOptions.forceBuildAll || isModified(working, stored)) {
|
||||||
LOGGER.info("Copying libs...");
|
LOGGER.info("Copying libs... (/" + folder + ")");
|
||||||
try {
|
try {
|
||||||
OS.rmdir(stored);
|
OS.rmdir(stored);
|
||||||
OS.cpdir(working, stored);
|
OS.cpdir(working, stored);
|
||||||
|
Loading…
Reference in New Issue
Block a user