blob: 3b72aab1e586272dbf2fbdaa1cabe0beee16e9c5 [file] [log] [blame]
jbudorick78730f182017-04-26 21:24:221# Copyright 2017 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5# Proguard flags for what should be kept in the main dex. Only used
6# during main dex list determination, not during actual proguarding.
7
jbudorickf091dcb2015-08-25 21:36:598-keep @**.MainDex class * {
9 *;
10}
jbudorickf667d3b3a2015-11-13 00:44:5811
12-keepclasseswithmembers class * {
Andrew Grieve524c5cdd2018-03-16 21:18:1313 @**.MainDex *;
14}
15
16-keepclasseswithmembers class * {
jbudorickf667d3b3a2015-11-13 00:44:5817 public static ** asInterface(android.os.IBinder);
18}
agrieve23ea0f52016-01-06 01:58:5819
20# Required when code coverage is enabled.
21-keep class com.vladium.** {
jbudorick73357e232017-05-02 18:59:0622 *;
23}
24
John Budorick7c3794d2017-05-23 16:15:3825-keep public class * extends android.app.Service {
26 <init>();
27}
28
jbudorick73357e232017-05-02 18:59:0629# Used by tests for secondary dex extraction.
30-keep class android.support.v4.content.ContextCompat {
31 *;
agrieve23ea0f52016-01-06 01:58:5832}
Andrew Grieveed8cd472018-03-16 02:06:1133
34# Need test classes to be in the main dex because test listing does not
35# load secondary dex on Dalvik devices.
36-keep @**.RunWith class * {}
Andrew Grieve524c5cdd2018-03-16 21:18:1337
38# The following are based on $SDK_BUILD_TOOLS/mainDexClasses.rules
39# Ours differ in that it omits -keeps for application / instrumentation /
40# backupagents (these are added by aapt's main dex list rules output).
41# The keeps in this file are not only redundant, but the explicit -keep
42# of Application.attachBaseContext() is overly broad and adds ~20k methods to
43# chrome_public_apk at the time of this change.
44
45######## START mainDexClasses.rules ########
46
47# We need to keep all annotation classes because proguard does not trace annotation attribute
48# it just filter the annotation attributes according to annotation classes it already kept.
49-keep public class * extends java.lang.annotation.Annotation {
50 *;
51}
52# Keep old fashion tests in the main dex or they'll be silently ignored by InstrumentationTestRunner↵
53-keep public class * extends android.test.InstrumentationTestCase {
54 <init>();
55}
56
57######## END mainDexClasses.rules ########