I have an existing gradle-based Android application, and I would like to use it as a library module in another app while still being able to build it a standalone app (and keep the same package name).
I've tried to convert it into a library module and create a new app that wraps it, but the app cannot have the same package name as one of its lib modules.
Changing the package name of the standalone app is not an option because it's alreayd published on the Play Store. And changing the package name of the library module would have huge impacts (e.g in the java code).
How could I achieve that?
Is there any other altenative, such as having two build.gradle
files in the project (one for app module definition, and one for the library module)?