From 6ba873faec0d165b74acfecf1533f58433d431e9 Mon Sep 17 00:00:00 2001 From: Rohit Agrawal Date: Thu, 21 Apr 2016 16:29:58 -0700 Subject: 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 Change-Id: Ic18c8c563794ff27a5598a214111d1b446a005f1 (cherry picked from commit 86229cb622fccde8ab8cbe85eead91a34313a708) --- tools/aapt/Command.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/aapt/Command.cpp') diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 5e2e82601b47..ba4aac6f32a8 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -2573,6 +2573,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 -- cgit v1.2.3-59-g8ed1b