|
1 | 1 | // R8 is a code shrinker and obfuscator for Android applications. Is designed to optimize the size of the APK |
2 | 2 | // while maintaining the functionality of the app. |
3 | 3 | // When using R8, you can configure the rules for code shrinking and obfuscation in a ProGuard configuration file. |
| 4 | +// R8 relies on ProGuard rules files to adjust its default behavior and gain a better understanding of your app’s structure, |
| 5 | +// such as identifying the classes that act as entry points. While you can modify some of these rules files, |
| 6 | +// certain rules may be automatically generated by compile-time tools (like AAPT2) or inherited from your app’s library dependencies. |
4 | 7 | // You need 2 files on the root of your project: |
5 | | -// 1. proguard-rules.pro: This file contains the rules for R8 to follow when shrinking and obfuscating the code. |
6 | | -// 2. test-proguard-rules.pro: This file contains the rules for R8 to follow when shrinking and obfuscating the unit and instrumented tests. |
7 | | -// You can also override the default Proguard files by using override def proguardConfigs: T[Seq[PathRef]] |
8 | | -// See Also: app/proguard-rules.pro & app/test-proguard-rules.pro |
| 8 | +// |
| 9 | +// * proguard-rules.pro: This file contains the rules for R8 to follow when shrinking and obfuscating the code. |
| 10 | +// |
| 11 | +// * test-proguard-rules.pro: This file contains the rules for R8 to follow when shrinking and obfuscating the unit and instrumented tests. |
| 12 | +// |
| 13 | +// You can also override the default Proguard files by using `override def proguardConfigs: T[Seq[PathRef]]` |
| 14 | +// More informations about the R8 in general and about the Proguard rules files can be found in the links below: |
| 15 | +// |
| 16 | +// https://developer.android.com/build/shrink-code |
| 17 | +// |
| 18 | +// https://www.guardsquare.com/manual/configuration/usage |
9 | 19 | package build |
10 | 20 |
|
11 | 21 | import mill._, javalib._ |
@@ -86,9 +96,9 @@ object app extends AndroidAppModule { // <2> |
86 | 96 |
|
87 | 97 | */ |
88 | 98 |
|
89 | | -// R8 will run automatically when you run the androidReleaseInstall task. |
90 | | -// If you want to create the APK without R8, you can use the androidApk task to create the not-optimized APK. You can also |
91 | | -// run the andoidInstall task that will automaticaly run the androidApk and also install it in the emulator. |
92 | | -// The androidReleaseInstall task will install the optimized APK on the emulator. |
| 99 | +// R8 will run automatically when you run the `androidReleaseInstall` task. |
| 100 | +// If you want to create the APK without R8, you can use the `androidApk` task to create the not-optimized APK. You can also |
| 101 | +// run the `andoidInstall` task that will automaticaly run the `androidApk` and also install it in the emulator. |
| 102 | +// The `androidReleaseInstall` task will install the optimized APK on the emulator. |
93 | 103 | // So first you need to create the emulator and start it. |
94 | | -// After the emulator is started, you can run the androidReleaseInstall task and see the app in the emulator. |
| 104 | +// After the emulator is started, you can run the `androidReleaseInstall` task and see the app in the emulator. |
0 commit comments