• Home
  • Raw
  • Download

Lines Matching +full:proguard +full:- +full:like

5 …_size/optimization_advice.md#optimizing-java-code](/docs/speed/binary_size/optimization_advice.md#…
9 ## ProGuard vs R8
11 ProGuard is the original open-source tool used by many Android applications to
12 perform whole-program bytecode optimization. [R8](https://r8.googlesource.com/r8),
13 is a re-implementation that is used by Chrome (and the default for Android Studio).
14 The terms "ProGuard" and "R8" are used interchangeably within Chromium but
17 ## What does ProGuard do?
19 1. Shrinking: ProGuard will remove unused code. This is especially useful
22 2. Obfuscation: ProGuard will rename classes/fields/methods to use shorter
25 3. Optimization: ProGuard performs a series of optimizations to shrink code
31 ProGuard is enabled only for release builds of Chrome because it is a slow build
35 ### ProGuard configuration files
37 Most GN Java targets can specify ProGuard configuration files by setting the
38 `proguard_configs` variable. [//base/android/proguard](/base/android/proguard)
43 When `is_java_debug = false` and a target has enabled ProGuard, the `proguard`
44 step generates the `.dex` files for the application. The `proguard` step takes
45 as input a list of `.jar` files, runs R8/ProGuard on those `.jar` files, and
50 Obfuscation can be turned off for local builds while leaving ProGuard enabled
60 * ProGuard mapping files are located beside APKs (ex.
65 * [Internal bits about how mapping files are archived][proguard-site]
66 * [More detailed deobfuscation instructions][proguard-doc]
67 * [Script for deobfuscating official builds][deob-official]
69 [proguard-site]: http://goto.google.com/chrome-android-proguard
70 [proguard-doc]: http://goto.google.com/chromejavadeobfuscation
71 [deob-official]: http://goto.google.com/chrome-android-official-deobfuscation
75 ProGuard failures are often hard to debug. This section aims to outline some of
80 The `-checkdiscard` directive can be used to ensure that certain items are
81 removed by ProGuard. A common use of `-checkdiscard` it to ensure that ProGuard
84 zero-overhead abstractions. Annotating a class with
85 [@CheckDiscard][checkdiscard] will add a `-checkdiscard` rule automatically.
92 |- is invoked from:
95 |- is referenced in keep rule:
96 | obj/chrome/android/chrome_public_apk/chrome_public_apk.resources.proguard.txt:104:1
111 access to native methods. We rely on ProGuard to fully optimize the generated
115 * The ProGuard rule pointed to in the error message isn't helpful (just tells
116 us a code path that reaches the not-inlined class).
120 `Jni.get()::methodName` vs. `() -> Jni.get.methodName()`).
121 * For more debugging info, add to `base/android/proguard/chromium_apk.flags`:
123 -whyareyounotinlining class org.chromium.base.library_loader.LibraryPrefetcherJni {
138 generated files and should be treated like source files rather than
147 Debugging ProGuard failures isn't easy, so please message java@chromium.org