Work around incorrect R8 proguard compatibility
Proguard treats -dontobfuscate -keepattributes *Annotations* the same as -dontobufscate by keeping all attributes. R8, even in proguard compatibility mode, discards all attributes that don't match, including EnclosingClass attributes that may be necessary. Pass -keepattributes * whenever passing -dontobfuscate to make R8 act more like proguard. This isn't a complete solution, some modules may set LOCAL_PROGUARD_ENABLED := custom and then manually specify -dontobfuscate on the command line or in a flags file, in which case they will see the incorrect behavior of R8. Bug: 80081393 Test: m checkbuild Test: examine attributes on com.android.stk.BootCompletedReceiver in out/target/common/obj/APPS/Stk_intermediates/classes.dex Change-Id: I761f2d0617c5295df8fc7adfc4fd00d2aa41961e
Loading
Please register or sign in to comment