What is the difference between gradlew build and gradlew assembleRelease

android, android-gradle-plugin, gradle, gradlew

Solution

Debug

./gradlew

Release

./gradlew assembleRelease

your gradle file should contains:

android {
   [...]
signingConfigs {
        release {
            storeFile file("../keystore.jks")
            storePassword "pwd"
            keyAlias "alias"
            keyPassword "pwd"
        }
    }

    buildTypes {

        release {
            signingConfig signingConfigs.release
        }
    }


   [...]
}

Problem

I want to build apk from command line with the help of gradle. Which command should I use to build apks for only release flavours?

Original source