Scarlet
Scarlet copied to clipboard
Proguard rules?
I tried to use scarlet (0.16 and 0.17) and I having an issue when proguard is enabled. Are there any specific rules for that?
i dont remember we have a specific proguard rules. can you post the errors?
I got proguard error :
`Note: there were 9 references to unknown classes. You should check your configuration for typos. (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass) Note: there were 2 references to unknown class members. You should check your configuration for typos. Note: there were 221 unkept descriptor classes in kept class members. You should consider explicitly keeping the mentioned classes (using '-keep'). (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass) Note: there were 49 unresolved dynamic references to classes or interfaces. You should check if you need to specify additional program jars. (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass) Warning: there were 111 unresolved references to classes or interfaces. You may need to add missing library jars or update their versions. 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 5 instances of library classes depending on program classes. You must avoid such dependencies, since the program classes will be processed, while the library classes will remain unchanged. (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency) Warning: there were 3 unresolved references to program class members. Your input classes appear to be inconsistent. You may need to recompile the code. (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember) Warning: Exception while processing task java.io.IOException: Please correct the above warnings first. Thread(Tasks limiter_1): destruction
Task :app:transformClassesAndResourcesWithProguardForRelease FAILED ` If I remove Scarlet from dependencies list everything is OK
The problem was in com.github.tinder.scarlet:scarlet-lifecycle-android module
this module included all third-party libs from scarlet (Jackson, Moshi , Rxjava1, RxJava 2 etc)

the solution is to exclude scarlet module from scarlet:scarlet-lifecycle-android
implementation ("com.github.tinder.scarlet:scarlet-lifecycle-android:$scarlet_version"){ exclude group: 'com.github.tinder', module: 'scarlet' }
Hope it will be useful
I had this same issue and took me quite some time to figure out it was an issue with Scarlet, it'd be great if the configuration shared by @SergiyKorotun can be added to the README to help future devs.