BracketCove / Profiler

Apache License 2.0
64 stars 23 forks source link

AuthSource implemented in Production Flavor #4

Open PrathameshKesarkar opened 7 years ago

PrathameshKesarkar commented 7 years ago

Don't you think you need to switch to Build Flavor evertime you need to test your app .The problem with that is every time you need to add a feature to your presenter class you need to switch your variant and test that feature you need switch back to Production build. If you count the time you are waiting for a build finish its huge.

Also what I have gathered from internet is you only need to remove Logging from your app in your production build and keep logging in your Debug built with your current architecture it is not possible .Because there is not Implementation of AuthSource in Debug build.

BracketCove commented 7 years ago

I'm curious as to what purpose you would use Build Variants/Product Flavors, if not to keep your Test Classes separate from your Production Classes, or swap out RxJava Schedulers based on whether you are running on the JVM or Android OS? These seem to me as primary Use Cases for these features in Gradle/Android Studio. Many repositories I've looked at from Developers much better than me or you also follow this convention.

I must ask, if not Build Variants, how would you go about keeping your Test sources separate from Production sources in absence of Build Flavors?

On your second point, I believe you are correct. However, I don't tend to use Logs for much at this point in my debugging process, and I like to remove them the moment they become useless (when I remember to anyways).

Thank you for the feedback.

PrathameshKesarkar commented 7 years ago

I'm curious as to what purpose you would use Build Variants/Product Flavors, if not to keep your Test Classes separate from your Production Classes

You are right about having an Abstract Layer for Testing and mocking purpose. But you can have an implementation in your Debug built rather than pushing it on your production built. so rather than using creating class of Implservice use the abstract class and change it's implementation in test built to MockClass