Androlib +buildLib()

This commit is contained in:
Ryszard Wiśniewski 2010-03-27 20:02:43 +01:00
parent 4e49612c18
commit dc1a645396

View File

@ -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);