Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to test against the release version of your app with Android Gradle plugin?

When I use the 'gradlew connectedCheck' command it always build the debug version and test against the debug version of my app. Is it also possible to test against the release version of my app?

I want to enable proguard and want to make sure that it doesn't filter anything out that is needed during runtime.

like image 372
Peter Fortuin Avatar asked Aug 05 '13 14:08

Peter Fortuin


1 Answers

You can only test against a single build type right now (though that may change).

To set the build type to test against:

android {
    testBuildType "release"
}

You could set this dynamically through a env var to not have to edit build.gradle all the time.

like image 138
Xavier Ducrohet Avatar answered Oct 13 '22 04:10

Xavier Ducrohet