summaryrefslogtreecommitdiff
path: root/tools/aapt/Package.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt/Package.cpp')
-rw-r--r--tools/aapt/Package.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/aapt/Package.cpp b/tools/aapt/Package.cpp
index 999a5cf82222..6e2a25ce8c7e 100644
--- a/tools/aapt/Package.cpp
+++ b/tools/aapt/Package.cpp
@@ -172,6 +172,16 @@ status_t writeAPK(Bundle* bundle, const sp<AaptAssets>& assets,
}
}
+ if (bundle->getGenDependencies()) {
+ // Add this file to the dependency file
+ String8 dependencyFile = outputFile.getBasePath();
+ dependencyFile.append(".d");
+
+ FILE* fp = fopen(dependencyFile.string(), "a");
+ fprintf(fp, "%s \\\n", outputFile.string());
+ fclose(fp);
+ }
+
assert(result == NO_ERROR);
bail: