Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle build and deploy specific buildtype

I want to build my gradle project with a certain buildtype and deploy it on device with a single command.

My build.gradle is setup for multiple buildtypes such as live and release.

I worked with maven before and i look for an equivalent of:

mvn clean install -P release android:deploy android:run

like image 773
Ostkontentitan Avatar asked Oct 10 '13 11:10

Ostkontentitan


1 Answers

Here is the command to build and deploy through a specified BuildType. ( Thank you Varun! )

gradle installProfilename

Where Profilename of course would be the name of the BuildType specified in build.gradle

Example.:

gradle installRelease

Would build with the release profile:

buildTypes {

    release {
        debuggable false
        jniDebugBuild false
        signingConfig signingConfigs.main
        . . . 
    }

Addition.:

Gradle can show you what tasks are available.:

gradle tasks
like image 144
Ostkontentitan Avatar answered Oct 05 '22 23:10

Ostkontentitan