mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-05 02:22:55 +01:00
Androlib +buildLib()
This commit is contained in:
parent
4e49612c18
commit
dc1a645396
@ -104,6 +104,7 @@ public class Androlib {
|
||||
new File(appDir, APK_DIRNAME).mkdirs();
|
||||
buildSources(appDir, forceBuildAll);
|
||||
buildResources(appDir, forceBuildAll);
|
||||
buildLib(appDir, forceBuildAll);
|
||||
buildApk(appDir);
|
||||
}
|
||||
|
||||
@ -215,6 +216,24 @@ public class Androlib {
|
||||
}
|
||||
}
|
||||
|
||||
public void buildLib(File appDir, boolean forceBuildAll)
|
||||
throws AndrolibException {
|
||||
File working = new File(appDir, "lib");
|
||||
if (! working.exists()) {
|
||||
return;
|
||||
}
|
||||
File stored = new File(appDir, APK_DIRNAME + "/lib");
|
||||
if (forceBuildAll || isModified(working, stored)) {
|
||||
LOGGER.info("Copying libs...");
|
||||
try {
|
||||
OS.rmdir(stored);
|
||||
OS.cpdir(working, stored);
|
||||
} catch (BrutException ex) {
|
||||
throw new AndrolibException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void buildApk(File appDir) throws AndrolibException {
|
||||
LOGGER.info("Building apk file");
|
||||
File outApk = new File(appDir, OUT_APK_FILENAME);
|
||||
|
Loading…
Reference in New Issue
Block a user