What is the difference between the *
, **
and ***
wildcards in Proguard? For example:
-keep class com.mypackage.*
vs
-keep class com.mypackage.**
vs
-keep class com.mypackage.***
If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options. ( http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass) Warning: there were 2 unresolved references to program class members. Your input classes appear to be inconsistent.
What is ProGuard? ProGuard is a free java tool in Android, which helps us to do the following, Shrink(Minify) the code: Remove unused code in the project. Obfuscate the code: Rename the names of class, fields, etc. Optimize the code: Do things like inlining the functions.
R8 is having a faster processing time than Proguard which reduces build time. R8 gives better output results than Proguard. R8 reduces the app size by 10 % whereas Proguard reduces app size by 8.5 %. The android app having a Gradle plugin above 3.4.
* matches any part of a method name. OR matches any part of a class name not containing the package separator. ** matches any part of a class name, possibly containing any number of package separators. *** matches any type (primitive or non-primitive, array or non-array).
Note that the *
, and **
wildcards will never match primitive types. Furthermore, only the * wildcards will match array types of any dimension. For example, " get*()" matches "java.lang.Object getObject()"
, but not "float getFloat()"
, nor "java.lang.Object[] getObjects()"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With