Android: Make R.java inheritance work with Trichrome proguard.
212f516e changed the way R.java files work so that all resources are stored in a base R.java file, but accessed through R.java classes that subclass the base R.java. Currently for synchronized proguard, we combine all of the jars produced by the APK's java_library_impl() step. This dedupes class files, but also requires classes with the same name to be identical. With R.java inheritance, each APK will have a base module R.java with different contents, and Chrome will crash at runtime due to missing resources. We can't just rename the base module name in the various APKs that are part of synchronized proguarding because the subclass R.java files can only be included once, and can only have one direct superclass. Instead of creating a more complex R.java class hierarchy, this CL changes the compile_resources() step of the static library APK to generate a base R.java that contains the resources of both Chrome and Webview. Bug: 901465 Change-Id: Iaa2a05c75cd431b95afe6318da8c7982fffbc242 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1695699 Commit-Queue: Eric Stevenson <estevenson@chromium.org> Reviewed-by:Andrew Grieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#676552}
Showing
This diff is collapsed.
Please register or sign in to comment