X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/e3b183068f71829363c2b613f3a6f1c714c3a5cb..0150a07c6a9b14de684d129d369ac995f7b3f4b3:/Resource.cpp diff --git a/Resource.cpp b/Resource.cpp index 730bd71..99e781d 100644 --- a/Resource.cpp +++ b/Resource.cpp @@ -51,6 +51,12 @@ ResourceTypeSet::ResourceTypeSet() { } +FilePathStore::FilePathStore() + :RefBase(), + Vector() +{ +} + class ResourceDirIterator { public: @@ -1917,6 +1923,16 @@ status_t writeResourceSymbols(Bundle* bundle, const sp& assets, return err; } fclose(fp); + + if (bundle->getGenDependencies()) { + // Add this R.java to the dependency file + String8 dependencyFile(bundle->getRClassDir()); + dependencyFile.appendPath("R.d"); + + fp = fopen(dependencyFile.string(), "a"); + fprintf(fp,"%s \\\n", dest.string()); + fclose(fp); + } } return NO_ERROR; @@ -2194,6 +2210,11 @@ writeProguardForLayouts(ProguardKeepSet* keep, const sp& assets) } } } + // Handle the overlays + sp overlay = assets->getOverlay(); + if (overlay.get()) { + return writeProguardForLayouts(keep, overlay); + } return NO_ERROR; } @@ -2239,3 +2260,16 @@ writeProguardFile(Bundle* bundle, const sp& assets) return err; } + +status_t +writeDependencyPreReqs(Bundle* bundle, const sp& assets, FILE* fp) +{ + status_t deps = -1; + sp files = assets->getFullResPaths(); + for (size_t file_i = 0; file_i < files->size(); ++file_i) { + // Add the full file path to the dependency file + fprintf(fp, "%s \\\n", files->itemAt(file_i).string()); + deps++; + } + return deps; +}