I'm trying to separate debug and release functionality in my app. For instance I'm using Stetho and Mortar libraries. They both require overridden Application class. But I would like Stetho to be accessible only in debug build. There are at least two approaches:
Have MyApplication
class in release and debug flavors with different code. But in this case code which should be user in release build is duplicated.
MyDebugApplication
extends MyApplication
and contains only debug related stuff. In this case two Manifest files are required and merged some how.
So I'm wondering which approach is more efficient ?