i have written android library. but when i integrate aar into client app. i can actually see private/internal/public methods of "public" classes. what i expect is: it should show only "public" methods of "public" classes.
i am using R8, for release build i have following settings in library gradle file.
buildTypes {
release {
minifyEnabled true
proguardFiles 'proguard-rules.pro'
}
}
proguard-rules.pro file contents:
-keep class com.comp.sdk.UserManager {
public *;
}
here UserManager is 'object' in kotlin.
after building aar file. distributing to client app. client app can still see private/public/internal methods for UserManager object.
my question is how can i write r8 rules for showing only public methods/variables of User object in kotlin?