summaryrefslogtreecommitdiff
path: root/tools/aapt/Command.cpp
diff options
context:
space:
mode:
authorRohit Agrawal <rohitagr@google.com>2016-04-21 16:29:58 -0700
committerRohit Agrawal <rohitagr@google.com>2016-04-27 19:50:55 +0000
commit682583c8902efbd33d4394131a2214ce94469535 (patch)
tree16b35113be2d432f6b58948de3b4f9045aace8e1 /tools/aapt/Command.cpp
parent987609f5a7bd8e18559334aa0260e6614520af13 (diff)
AAPT: ProGuard config for components in main dex.
Create an analogue of "aapt -G" which outputs a proguard configuration that keeps only components which need to be in the main dex. Bug: 27383099 Bug: 28425556 Change-Id: Ic18c8c563794ff27a5598a214111d1b446a005f1 (cherry picked from commit 86229cb622fccde8ab8cbe85eead91a34313a708)
Diffstat (limited to 'tools/aapt/Command.cpp')
-rw-r--r--tools/aapt/Command.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index db40416111d5..9976d00fa872 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -2631,6 +2631,12 @@ int doPackage(Bundle* bundle)
goto bail;
}
+ // Write out the Main Dex ProGuard file
+ err = writeMainDexProguardFile(bundle, assets);
+ if (err < 0) {
+ goto bail;
+ }
+
// Write the apk
if (outputAPKFile) {
// Gather all resources and add them to the APK Builder. The builder will then