I searched a little about this here but didn't found anything that helps me, maybe because it's impossible but I need confirmation.
The situation is the following: I have an android app that integrate with many mobile POS, these card machines, and because I have many classes to integrate with these machines, the app became heavy for some POS stores, like Stone.
I saw that it's possible to implement the libs modules and dependencies for specific flavors with android, so I would generate an specific app, with just the classes that this integration use and nothing more, but I have everything together now, just like in the pics.
And when I build an app that will be used with Stone, for example, it will put all integrations in the JS interface.
I stated changing it, implementing by flavor but as the implementation is per integration now, the Cielo class starts having problems with its dependencies because, as the app will be for Stone, it doesn't download the Cielo dependencies. The generation process crash. When I started changing the structure, I manage to make the gradle build work, but after that, everything crashes.
There is something I can do ? Maybe impost only when the Cielo package really exists, or something like that.
If its needed to change the entire structure, it's ok, I just need to make it smaller but still in one place.
Thanks!
I tried using flavors and separating the source sets alongside main directory, like:
-main
--assets
--java
-cielo
--java
-stone
but it still have a problem when building because the import inside my main class.
You can split your application to multiple parts:
Finally you can deploy the main app and only one required integration service.