mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-06 10:05:54 +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"));
|
||||
|
||||
buildLib(appDir);
|
||||
buildLibs(appDir);
|
||||
buildCopyOriginalFiles(appDir);
|
||||
buildApk(appDir, outFile);
|
||||
|
||||
@ -516,15 +517,24 @@ public class Androlib {
|
||||
}
|
||||
}
|
||||
|
||||
public void buildLib(File appDir)
|
||||
throws AndrolibException {
|
||||
File working = new File(appDir, "lib");
|
||||
if (!working.exists()) {
|
||||
public void buildLib(File appDir) throws AndrolibException {
|
||||
buildLibrary(appDir, "lib");
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
File stored = new File(appDir, APK_DIRNAME + "/lib");
|
||||
|
||||
File stored = new File(appDir, APK_DIRNAME + "/" + folder);
|
||||
if (apkOptions.forceBuildAll || isModified(working, stored)) {
|
||||
LOGGER.info("Copying libs...");
|
||||
LOGGER.info("Copying libs... (/" + folder + ")");
|
||||
try {
|
||||
OS.rmdir(stored);
|
||||
OS.cpdir(working, stored);
|
||||
|
Loading…
Reference in New Issue
Block a user