| # Proguard config for apps that depend on cronet_impl_native_java.jar. |
| |
| # This constructor is called using the reflection from Cronet API (cronet_api.jar). |
| -keep class org.chromium.net.impl.NativeCronetProvider { |
| public <init>(android.content.Context); |
| } |
| |
| # Suppress unnecessary warnings. |
| -dontnote org.chromium.net.ProxyChangeListener$ProxyReceiver |
| -dontnote org.chromium.net.AndroidKeyStore |
| # Needs 'void setTextAppearance(int)' (API level 23). |
| -dontwarn org.chromium.base.ApiCompatibilityUtils |
| # Needs 'boolean onSearchRequested(android.view.SearchEvent)' (API level 23). |
| -dontwarn org.chromium.base.WindowCallbackWrapper |
| |
| # Generated for chrome apk and not included into cronet. |
| -dontwarn org.chromium.base.multidex.ChromiumMultiDexInstaller |
| -dontwarn org.chromium.base.library_loader.LibraryLoader |
| -dontwarn org.chromium.base.SysUtils |
| -dontwarn org.chromium.build.NativeLibraries |
| |
| # Objects of this type are passed around by native code, but the class |
| # is never used directly by native code. Since the class is not loaded, it does |
| # not need to be preserved as an entry point. |
| -dontnote org.chromium.net.UrlRequest$ResponseHeadersMap |
| # https://android.googlesource.com/platform/sdk/+/marshmallow-mr1-release/files/proguard-android.txt#54 |
| -dontwarn android.support.** |
| |
| # This class should be explicitly kept to avoid failure if |
| # class/merging/horizontal proguard optimization is enabled. |
| -keep class org.chromium.base.CollectionUtil |
| |
| # Skip protobuf runtime check for isOnAndroidDevice(). |
| # A nice-to-have optimization shamelessly stolen from //third_party/protobuf/java/lite/proguard.pgcfg. |
| -assumevalues class com.google.protobuf.Android { |
| static boolean ASSUME_ANDROID return true; |
| } |
| |
| # Protobuf builder uses reflection so make sure ProGuard leaves it alone. See |
| # https://crbug.com/1395764. |
| # Note that we can't simply use the rule from |
| # //third_party/protobuf/java/lite/proguard.pgcfg, because some users who |
| # consume our ProGuard rules do not want all their protos to be kept. Instead, |
| # use a more specific rule that covers Chromium protos only. |
| -keepclassmembers class org.chromium.** extends com.google.protobuf.GeneratedMessageLite { |
| <fields>; |
| } |