Status Update
Comments
cc...@google.com <cc...@google.com> #2
ap...@google.com <ap...@google.com> #3
ch...@google.com <ch...@google.com> #4
Branch: androidx-master-dev
commit 3ed3fb003fa6c1244f923202859a616225b5b2fa
Author: Ian Lake <ilake@google.com>
Date: Fri Feb 14 11:17:46 2020
Create an interface for layouts that can be opened
Create a common interface that represents layouts
that have two states: open and closed. This allows
higher level libraries to rely on the interface,
rather than concrete implementations such as
DrawerLayout, making them more resilient to
changes in the current recommended implementation.
Fixes: 129979320
Test: ./gradlew checkApi
Change-Id: I0f2a1414977825aa053c6555261f2b7d4417bd19
M customview/customview/api/1.1.0-alpha02.txt
M customview/customview/api/current.txt
M customview/customview/api/public_plus_experimental_1.1.0-alpha02.txt
M customview/customview/api/public_plus_experimental_current.txt
M customview/customview/api/restricted_1.1.0-alpha02.txt
M customview/customview/api/restricted_current.txt
A customview/customview/src/main/java/androidx/customview/widget/Openable.java
M drawerlayout/drawerlayout/api/1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/current.txt
M drawerlayout/drawerlayout/api/public_plus_experimental_1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/public_plus_experimental_current.txt
M drawerlayout/drawerlayout/api/restricted_1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/restricted_current.txt
M drawerlayout/drawerlayout/build.gradle
M drawerlayout/drawerlayout/src/main/java/androidx/drawerlayout/widget/DrawerLayout.java
M jetifier/jetifier/migration.config
M slidingpanelayout/slidingpanelayout/api/1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/current.txt
M slidingpanelayout/slidingpanelayout/api/public_plus_experimental_1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/public_plus_experimental_current.txt
M slidingpanelayout/slidingpanelayout/api/restricted_1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/restricted_current.txt
M slidingpanelayout/slidingpanelayout/src/main/java/androidx/slidingpanelayout/widget/SlidingPaneLayout.java
cc...@google.com <cc...@google.com> #5
Confirm that adding proguard-android-optimize.txt
or those rules directly works around the issue.
I was missing it since I generally try to avoid proguard-android-optimize.txt
since it is too inclusive in some cases.
Why are standard rules for enums necessary?
ze...@google.com <ze...@google.com> #6
The Java standard library has implemented various parts of the enum by use of reflection within the runtime, so maintaining that behavior has required these rules in both Proguard and R8.
cc...@google.com <cc...@google.com> #7
Is it possible for R8 to figure out which enum classes are potentially fed to such stl methods? If so, and the stl behavior is consistent (and stl using values to implement class.enumConstants seems reasonable), it would be nice to avoid this necessary configuration (even if studio gives it to you by default in the very stale proguard-android-optimize
list).
Either that, or could make enum value/valueOf minification opt-in.
ze...@google.com <ze...@google.com> #8
Unfortunately, we have not been able to come up with a safe/sound analysis that can determine when the rules are not needed. Conversely, we have no way of safely keeping the enums that is less conservative than the rules. There are clients that do not have these rules as they manually ensure that they have no usages of enums that would break. Thus we can't make the rules part of the compiler and we can't safely determine when they are needed. We are not happy with that situation, but we currently have no better alternatives.
cc...@google.com <cc...@google.com> #9
Fair enough, feel free to close as WAI. Understand that the cost to migrate the default is non-zero, with minimal benefit.
ch...@google.com <ch...@google.com>
pr...@google.com <pr...@google.com> #10
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-junit4:1.3.0-alpha05
Description
In tweaking proguard rules in androidx microbenchmarks, I noticed that some of our generated moshi code references to a values array are failing to resolve, and crashing at runtime:
Repro AndroidX CL, which just enables R8 in a trivial sample benchmark, and tweaks proguard rules to get it (almost) running:https://android-review.git.corp.google.com/c/platform/frameworks/support/+/3073538