I have an issue with R8. In MyLib
I have public abstract MyLibsClass
in which I have protected methods. MyChildClass
extends from MyLibsClass
in MyApp
and after R8's magic all protected methods (including protected abstract) in MyLibsClass
are changed into public ones, and of course in MyChildClass
I'm getting "attempting to assign weaker access privileges ('protected'); was 'public')
issue as trying to override protected abstract methods.
Additional info
gradle-6.0.1
MyLib's build.gradle
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),'proguard-rules.pro'
}
proguard-rules.pro
-keep class com.example.mylib.*{
public protected *; }
-keep class com.example.mylib.*$*{
public protected *; }
Anyone had this kind of issue or know a way to fix this?