From 85240f0145d6b41b4a9ad9db4eccb9346f36bf96 Mon Sep 17 00:00:00 2001 From: johan12345 Date: Sun, 16 Oct 2022 12:40:36 +0200 Subject: [PATCH] add possibility to pass fronyx API key with env variables --- app/build.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index c4304081..c2b89290 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -141,6 +141,13 @@ android { if (chargepriceKey != null) { variant.resValue "string", "chargeprice_key", chargepriceKey } + def fronyxKey = env.FRONYX_API_KEY ?: project.findProperty("FRONYX_API_KEY") + if (fronyxKey == null && project.hasProperty("FRONYX_API_KEY_ENCRYPTED")) { + fronyxKey = decode(project.findProperty("FRONYX_API_KEY_ENCRYPTED"), "FmK.d,-f*p+rD+WK!eds") + } + if (fronyxKey != null) { + variant.resValue "string", "fronyx_key", fronyxKey + } } }