X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/b3a9ca1e671a74fe41d2d9cd97acc2553f3a6bc7..bc7b4f407e6a1c83d1e953fb54a347dc6c26ad24:/Command.cpp diff --git a/Command.cpp b/Command.cpp index 739763e..c7dfb8f 100644 --- a/Command.cpp +++ b/Command.cpp @@ -1414,6 +1414,17 @@ int doPackage(Bundle* bundle) if (assets->getPackage() == assets->getSymbolsPrivatePackage()) { if (bundle->getCustomPackage() == NULL) { err = writeResourceSymbols(bundle, assets, assets->getPackage(), true); + // Copy R.java for libraries + if (bundle->getExtraPackages() != NULL) { + // Split on semicolon + String8 libs(bundle->getExtraPackages()); + char* packageString = strtok(libs.lockBuffer(libs.length()), ";"); + while (packageString != NULL) { + err = writeResourceSymbols(bundle, assets, String8(packageString), true); + packageString = strtok(NULL, ";"); + } + libs.unlockBuffer(); + } } else { const String8 customPkg(bundle->getCustomPackage()); err = writeResourceSymbols(bundle, assets, customPkg, true);