From bd29e1738cf82c175585db065984030d7f492b45 Mon Sep 17 00:00:00 2001 From: Patrick Honkonen <1883101+SaintPatrck@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:49:09 -0500 Subject: [PATCH] [PM-16052] Add CI_INFO build config field (#4471) --- app/build.gradle.kts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0ca4117e7c..b02113d6d3 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -33,6 +33,16 @@ val userProperties = Properties().apply { } } +/** + * Loads CI-specific build properties that are not checked into source control. + */ +val ciProperties = Properties().apply { + val ciPropsFile = File(rootDir, "ci.properties") + if (ciPropsFile.exists()) { + FileInputStream(ciPropsFile).use { load(it) } + } +} + android { namespace = "com.x8bit.bitwarden" compileSdk = libs.versions.compileSdk.get().toInt() @@ -52,6 +62,12 @@ android { } testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + + buildConfigField( + type ="String", + name = "CI_INFO", + value = "\"${ciProperties.getOrDefault("ci.info", "local")}\"" + ) } androidResources {