From 2bb2091234ba6315a2d0466c6ff3c3c696c02d44 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Sun, 2 Oct 2022 16:26:44 +0100 Subject: [PATCH] switching to lazy variant configuration --- app/build.gradle | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0c81f66..a52087c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,11 +16,6 @@ android { if (isDebugBuild) { resConfigs "en", "xxhdpi" - variantFilter { variant -> - if (variant.buildType.name == "release") { - setIgnore(true) - } - } } else { resConfigs "en" } @@ -67,6 +62,13 @@ android { } } +if (isDebugBuild) { + androidComponents { + def release = selector().withBuildType("release") + beforeVariants(release) { it.enabled = false } + } +} + dependencies { coreLibraryDesugaring Dependencies.google.jdkLibs