| AndroidTestKeepRulesPlugin.kt |
Keeps the app code that instrumented tests use when they run against a minified build.
R8 only sees the app when it minifies it, so it removes or renames code that only the androidTest APK calls, and the
tests then crash at runtime. For the build type passed as `-PtestBuildType`, this plugin traces what the androidTest
classes reference in the app and adds keep rules for it to that variant's R8 configuration. Builds that don't pass
`-PtestBuildType` are left untouched, so shipping builds are unaffected.
|
3200 |
- |
| GenerateAndroidTestKeepRules.kt |
Runs R8's TraceReferences with the classes only the androidTest APK contains as the source, and the app's
unminified classes as the target, and writes keep rules for every app class and member the source references.
Classes the app also contains are dropped from the source: the test APK leaves them out and uses the app's copy at
runtime, so they have to be traced as part of the target.
|
7114 |
- |