mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-03 23:34:26 +02: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();
|
new File(appDir, APK_DIRNAME).mkdirs();
|
||||||
buildSources(appDir, forceBuildAll);
|
buildSources(appDir, forceBuildAll);
|
||||||
buildResources(appDir, forceBuildAll);
|
buildResources(appDir, forceBuildAll);
|
||||||
|
buildLib(appDir, forceBuildAll);
|
||||||
buildApk(appDir);
|
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 {
|
public void buildApk(File appDir) throws AndrolibException {
|
||||||
LOGGER.info("Building apk file");
|
LOGGER.info("Building apk file");
|
||||||
File outApk = new File(appDir, OUT_APK_FILENAME);
|
File outApk = new File(appDir, OUT_APK_FILENAME);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user