Reputation: 17637
I have an Android App with build types "release" and "debug"
When I build it with
./gradlew build
It always uses the debug build type.
Why that and how can I choose to build release?
Upvotes: 1
Views: 1056
Reputation: 5892
If you are using Android Studio you can change the default executed build type int the left bottom tab called Build Variants. There you can see your app and build types. When you change it for your app and press the execution button, it executes the new default task provided. However, I don't really know how to change the default one using the command line, but you can execute the one you want with the next template:
gradle taskFlavorBuildType
for example, to build a debug build type it is:
gradle assembleDebug
You can find more info here.
Upvotes: 2