Why do you use `minifyEnabled = true` in debug builds?
I've been studying these samples, and couldn't help but notice that you're using the new Shrinker in debug builds. I was wondering why? Wouldn't there be performance penalty in build time? And how would it affect debugging and the performance of Instant Run?
In I/O 2016 they showed that by having a "dev" build flavor and setting minSDK to 21, which will enable the new multidexing in ART and make everything faster.
So, a lot of questions and wonderings, it would be so great if you could answer these questions and perhaps add inline comments in build.gradle and explain why you're doing what you're doing, etc.
Thank you for these samples!
Yes there can be a performance benefit but your mileage may vary. In our case and in the machines I tried at the time, it was building much faster.
It's a trade-off, every project should probably experiment whether it's worth running the shrinker. It does have a build-time cost but it can decrease dexing time and dex2oat (initial startup) time, especially if you have a lot of dependencies.
As for the dev build, Instant Run looks at the target device API level anyway (not the declared min SDK level). It's still a useful trick if you don't/can't use IR for some reason.
Thanks for the info! :)