summaryrefslogtreecommitdiff
path: root/deps/v8/build/android/main_dex_classes.flags
blob: 9163c5097f501929e2c07d89b368d5cdecb06663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Proguard flags for what should be kept in the main dex. Only used
# during main dex list determination, not during actual proguarding.

-keep @org.chromium.base.annotations.MainDex class * {
  *;
}

-keepclasseswithmembers class * {
  @org.chromium.base.annotations.MainDex <methods>;
}

# Assume all IDL-generated classes should be kept. They can't reference other
# non-framework classes, so fairly low-risk.
-keepclasseswithmembers class * {
  public static ** asInterface(android.os.IBinder);
}

# Required when code coverage is enabled.
-keep class com.vladium.** {
  *;
}

# Renderers / GPU process don't load secondary dex.
-keep public class * extends org.chromium.base.process_launcher.ChildProcessService {
  *;
}

# WebView doesn't load secondary dex.
-keep public class com.android.webview.** {
  *;
}

-keep public class org.chromium.android_webview.** {
  *;
}

# Used by tests for secondary dex extraction.
-keep class android.support.v4.content.ContextCompat {
  *;
}

# The following are based on $SDK_BUILD_TOOLS/mainDexClasses.rules
# Ours differ in that:
# 1. It omits -keeps for application / instrumentation / backupagents (these are
#    redundant since they are added by aapt's main dex list rules output).
# 2. Omits keep for Application.attachBaseContext(), which is overly broad.
# 3. Omits keep for all annotations, which is also overly broad (and pulls in
#    any class that has an @IntDef).

######## START mainDexClasses.rules ########

# Keep old fashion tests in the main dex or they'll be silently ignored by InstrumentationTestRunner
-keep public class * extends android.test.InstrumentationTestCase {
  <init>();
}

######## END mainDexClasses.rules ########