I am writing an application, which consists of base module and a number of derived modules. They are only different in package name and resources. Both base and derived modules are application modules. The problem is when the base module is not marked as library, the following happens:
- resources from base are missing in derived app .apk
- if comment out references to resources, derived app crashes at start with ClassNotFoundException(my Activity class).
But if mark base as library then everything is ok.
Is this the intended behaviour? Base dependency scope is set to compile, shouldn't library and not library behave the same way?
PS It is not so important for me to be able to run base app, although it is useful. The more important thing is that i need id's contained in R.java to be final, and for libraries they are not.
If I could optionally mark a module so that R.java is generated with final modifier, or if the base application module resources/classes were included in derived module, that would solve the issue.