Prerequisites
You already defined productFlavor
in your module level build.gradle.kts
.
productFlavors {
create("development") {
applicationIdSuffix = ".development"
}
create("stating") {
applicationIdSuffix = ".staging"
}
create("production") {
}
}
How to do
Only you have to remember is two concepts.
- The following command will build as app type and flavor
./gradlew assemble<Flavor><BuildType>
- If you want to check what command are you available
./gradlew tasks --all
When I want to build Staging
as flavor, debug
as type you can execute the following command.
./gradlew assembleStagingDebug
コメント