Reputation: 9212
I have a fairly typical Android-Studio/Gradle project with several library modules and one module that defines the launcher activity. So, one APK, so far so good.
But I want to have a second APK generated out of a new top-level project. Note that it's not just a flavor, it's a different app that needs to be in a different module. Still I want to reuse most library modules, so I want it to be in the same Gradle project (and the same Git repo).
Can I just create a new Android module (apply plugin: 'android'
) with its own launcher activity? In that case, what will ./gradlew assemble
build?
Upvotes: 0
Views: 68
Reputation: 28063
Can I just create a new Android module (apply plugin: 'android') with its own launcher activity? In that case, what will ./gradlew assemble build?
Yes you can create a new Android module and when you run ./gradlew assemble
it will build both modules.
In case you want to build just one you can run ./gradlew :module:assemble
Upvotes: 2