I am using a library or a dependency that has a security problem in one of its sub-packages. Assume that the name of the package is parent and the name of the sub package that is causing the problem is child, unfortunately I have to -keep the package to make the app work, otherwise I get the famous crash that says no such method exception or whatever. So I need to keep the package. The issue is when uploading the apk to google play console, I get a security issue inside of one of the sub packages of this third-party package. Is there a way to ask R8/Proguard to -keep only parent but remove the child.
I tried with chat gpt and I got this answer but I don't think it is working:
-keep class com.example.parent.** {
*;
!public class com.example.parent.child;
}
I read the whole documentation of R8 in android, and also read a little in the docs of Proguard in general but I don't think I could find anything useful.