OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This file is for proguard flags which will be applied to apks that are being | 5 # This file is for proguard flags which will be applied to apks that are being |
6 # built to be instrumentation tested. The flags in this file should only affect | 6 # built to be instrumentation tested. The flags in this file should only affect |
7 # how the instrumentation tests interact with the .apk. Do not put any flags in | 7 # how the instrumentation tests interact with the .apk. Do not put any flags in |
8 # this file which might affect the correctness of the .apk. | 8 # this file which might affect the correctness of the .apk. |
9 | 9 |
10 # We don't optimize to prevent inlining functions our instrumentation tests rely | 10 # We don't optimize to prevent inlining functions our instrumentation tests rely |
11 # on. | 11 # on. |
12 -dontoptimize | 12 -dontoptimize |
| 13 |
| 14 # Keep for class level annotations. |
| 15 -keep @**.VisibleForTesting class * |
| 16 |
| 17 # Keeps for method level annotations. |
| 18 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
| 19 @**.VisibleForTesting <methods>; |
| 20 } |
| 21 -keepclasseswithmembers class org.chromium.** { |
| 22 @**.VisibleForTesting <methods>; |
| 23 } |
| 24 |
| 25 # TODO(aurimas): figure out why we need to keep these classes. |
| 26 -keep class org.chromium.base.test.** { |
| 27 *; |
| 28 } |
| 29 |
| 30 # Everything below this is kept because they are referenced by the test APK. |
| 31 -keep class android.support.v7.mediarouter.R* { |
| 32 *; |
| 33 } |
| 34 |
| 35 -keep class android.support.v7.media.MediaRouteProvider** { |
| 36 *; |
| 37 } |
| 38 |
| 39 -keep class android.support.v4.app.FragmentManager** { |
| 40 *; |
| 41 } |
| 42 |
| 43 -keep class android.support.v4.app.DialogFragment** { |
| 44 *; |
| 45 } |
| 46 |
| 47 -keep class android.support.v7.app.NotificationCompat** { |
| 48 *; |
| 49 } |
| 50 |
| 51 -keep class android.support.v7.app.AlertDialog** { |
| 52 *; |
| 53 } |
| 54 |
| 55 -keep class com.google.android.gms.cast.CastMediaControlIntent* { |
| 56 *; |
| 57 } |
| 58 |
| 59 -keepnames class com.google.android.gms.gcm.** { |
| 60 *; |
| 61 } |
| 62 |
| 63 -keepclassmembers class com.google.android.gms.gcm.TaskParams { |
| 64 public <init>(java.lang.String); |
| 65 } |
| 66 |
| 67 -keepnames class jp.tomorrowkey.android.gifplayer.** { |
| 68 public *; |
| 69 } |
| 70 |
| 71 # Used in tests. |
| 72 -keep class android.support.v4.view.ViewCompat { |
| 73 public static int getLayoutDirection(android.view.View); |
| 74 } |
| 75 |
| 76 # flingViewport is used by Android WebView and a Chrome test. |
| 77 -keepclassmembers class org.chromium.content.browser.ContentViewCore { |
| 78 public void flingViewport(long, int, int); |
| 79 } |
| 80 |
| 81 # Needed to compile ChromeTest.apk |
| 82 -keep class android.support.customtabs.** { |
| 83 *; |
| 84 } |
| 85 |
| 86 # TODO(yfriedman): Remove when crbug.com/488192 is fixed. |
| 87 -dontwarn org.apache.http.conn.scheme.LayeredSocketFactory |
| 88 |
| 89 # Needed to run ChromeTest.apk |
| 90 -keepnames class com.google.android.gms.common.GoogleApiAvailability { |
| 91 *; |
| 92 } |
| 93 |
| 94 # Needed for chrome_sync_shell_test_apk. Note - these do no affect chrome_apk's |
| 95 # size. |
| 96 -keep class org.chromium.sync.protocol.* { *; } |
| 97 |
| 98 # These resources are referenced in tests, but not in the real application. |
| 99 -keepclassmembers class org.chromium.chrome.R$id { |
| 100 int webapp_splash_space; |
| 101 int mr_chooser_list; |
| 102 int find_toolbar; |
| 103 } |
OLD | NEW |