Reviewers: Xi Han
CL:
https://codereview.chromium.org/2054973002/Message:
Xi can you please take a look?
I used the "Chrome proguard file" instead of making a "WebApk specific proguard
file" because the "Chrome proguard file" is well maintained.
Description:
Upstream: Enable proguard on WebApk.template.apk in release mode
BUG=609122
Base URL:
https://chromium.googlesource.com/chromium/src.git@masterAffected files (+8, -2 lines):
M chrome/android/webapk/shell_apk/AndroidManifest.xml
M chrome/android/webapk/shell_apk/BUILD.gn
Index: chrome/android/webapk/shell_apk/AndroidManifest.xml
diff --git a/chrome/android/webapk/shell_apk/AndroidManifest.xml b/chrome/android/webapk/shell_apk/AndroidManifest.xml
index 68f9c309120cc13eaa76a5a6bac2996cf735ccef..4fd67d74a7dae20eb21515c37ba8e2eaf508ff2d 100644
--- a/chrome/android/webapk/shell_apk/AndroidManifest.xml
+++ b/chrome/android/webapk/shell_apk/AndroidManifest.xml
@@ -4,6 +4,7 @@
found in the LICENSE file.
-->
<manifest xmlns:android="
http://schemas.android.com/apk/res/android"
+ xmlns:tools="
http://schemas.android.com/tools"
package="{{ manifest_package }}"
android:versionCode="1"
android:versionName="1.0" >
@@ -26,7 +27,7 @@
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
- <data android:scheme="https" android:host="{{ scope_url_host }}" android:pathPrefix=""></data>
+ <data android:scheme="https" android:host="{{ scope_url_host }}" android:pathPrefix="/"></data>
</intent-filter>
</activity>
<meta-data android:name="runtimeHost" android:value="{{ runtime_host }}" />
@@ -34,7 +35,8 @@
<meta-data android:name="scope" android:value="{{ scope_url }}" />
<service
android:name="org.chromium.webapk.shell_apk.WebApkServiceFactory"
- android:exported="true">
+ android:exported="true"
+ tools:ignore="ExportedService">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.WEBAPK_API" />
Index: chrome/android/webapk/shell_apk/BUILD.gn
diff --git a/chrome/android/webapk/shell_apk/BUILD.gn b/chrome/android/webapk/shell_apk/BUILD.gn
index 3c9f4b26b77a3517dfa843cdc9f9dd5e102cfd12..285a1eb8025616e16acfde1d8718286a3b899668 100644
--- a/chrome/android/webapk/shell_apk/BUILD.gn
+++ b/chrome/android/webapk/shell_apk/BUILD.gn
@@ -66,6 +66,10 @@ android_apk("webapk") {
"//chrome/android/webapk/libs/common",
"//chrome/android/webapk/libs/runtime_library",
]
+ if (!is_debug) {
+ proguard_enabled = true
+ proguard_configs = [ "//chrome/android/java/proguard.flags" ]
+ }
}
android_library("shell_apk_javatests") {