Peter Fortuin
Peter Fortuin

Reputation: 5228

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.

Upvotes: 14

Views: 5435

Answers (1)

Xavier Ducrohet
Xavier Ducrohet

Reputation: 28549

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.

Upvotes: 28

Related Questions