Unverified Commit ba9a62e6 authored by Alex Catarineu's avatar Alex Catarineu Committed by Matthew Finkel
Browse files

Bug 40123: Allow building the instrumented tests apks for variants other than debug

This allows to specify the variant of the instrumented tests via
a `testBuildType` gradle argument. It also applies a workaround for
a R8 issue from https://issuetracker.google.com/issues/140851070.
parent 15e91be4
Pipeline #2174 failed with stages
......@@ -17,7 +17,16 @@ import org.gradle.internal.logging.text.StyledTextOutputFactory
import static org.gradle.api.tasks.testing.TestResult.ResultType
def obtainTestBuildType() {
def result = "debug";
if (project.hasProperty("testBuildType")) {
result = project.getProperties().get("testBuildType")
android {
testBuildType obtainTestBuildType()
compileSdkVersion Config.compileSdkVersion
if (project.hasProperty("testBuildType")) {
......@@ -120,3 +120,6 @@
# Keep Android Lifecycle methods
# https://bugzilla.mozilla.org/show_bug.cgi?id=1596302
-keep class androidx.lifecycle.** { *; }
# Workaround for 'already has mapping' r8 issue (https://issuetracker.google.com/issues/140851070)
-keep class com.google.android.gms.common.internal.BaseGmsClient { *; }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment