From 61fb0e77d1ff0d7fd4b6e76ebb0cd84dd58c6c94 Mon Sep 17 00:00:00 2001 From: Danijel Bojcic Date: Thu, 21 Oct 2021 01:35:08 +0200 Subject: [PATCH] fix: [Android] not picking correct .env (#617) --- android/dotenv.gradle | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/android/dotenv.gradle b/android/dotenv.gradle index c753639d..22253756 100644 --- a/android/dotenv.gradle +++ b/android/dotenv.gradle @@ -74,25 +74,4 @@ android { resValue "string", k, "\"$escaped\"" } } -} - -tasks.whenTaskAdded { task -> - if (project.hasProperty("envConfigFiles")) { - project.envConfigFiles.each { envConfigName, envConfigFile -> - if (task.name.toLowerCase() == "generate"+envConfigName+"buildconfig") { - android.applicationVariants.all { variant -> - def variantConfigString = variant.getName() - if (envConfigName.contains(variantConfigString.toLowerCase())) { - loadDotEnv(envConfigName) - project.env.each { k, v -> - def escaped = v.replaceAll("%","\\\\u0025") - variant.buildConfigField "String", k, "\"$v\"" - variant.resValue "string", k, "\"$escaped\"" - } - } - } - } - } - } -} - +} \ No newline at end of file