Implementing/learning/reading about r8/proguard. I stumbled upon the PR from Zac Sweers to add default r8 rules to kotlin-reflect and I'm reasearching whether or not my deps that come from square require proguard rules. Is the gist of r8 that you won't have to add proguard rules to any deps unless they use reflection?
10/16/2020, 2:10 PM
Many libraries, and I believe all square libraries, ship with R8 rules embedded, so you don’t need to add them manually
Other than that mostly yes, you don’t need any R8 rules as long as R8 can infer the usage automatically, and the biggest issue usually is reflection
Oof. Still looks like guava doesn't have any automatically.
10/18/2020, 1:20 AM
Guava doesn't embed any rules in their jar, wish they would
most libraries on the square side ship with the minimum that they need, but not necessarily all the ones needed for them to be used. With Moshi-kotlin for instance, it only keeps what's needed for it to work but you still have to keep any reflectively serialized models like any other reflective serializer would
10/22/2020, 2:43 AM
Thanks for clarifying. Starting to get the hang of how proguard/r8 works. I just ended up removing guava. Only use a smalllllll set of it's functionality.