I have developed an app which I was developing under staging environment
and now deployed it to production environment
which would be uploaded in google play store. So, for both environment app I am using productFlavors
which would build the different variant defining in the build gradle file.
My problem is: I am having some java files which I have to include in production build but not into staging build. How can I achieve this?
One of the solution: when I am selecting build variants I would add/delete the java files which is not the appropriate solution as I would update the app in future with more java files added to production
Edited: I don't want to make different src folder for different flavors. Wouldn't it be possible without making different folders? As I have already mentioned I'm having same code for different flavors.