From 8fa9467290a9c14cc055267c1db676d6b85e294c Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Tue, 2 Apr 2019 18:24:43 +0200 Subject: [PATCH] Gradle: Ignore non-greenfield build variants. --- app/build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index bb8d61ccb..0e845c990 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -101,6 +101,15 @@ android { } } + variantFilter { variant -> + def flavors = variant.flavors*.name.toString().toLowerCase() + + if (!flavors.contains("greenfield")) { + // For now everything that isn't a "greenfield" build isn't used. So let's ignore those variants. + setIgnore(true) + } + } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8