Skip to content

Commit

Permalink
[PM-16052] Add CI_INFO build config field (#4471)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintPatrck authored Dec 13, 2024
1 parent f28f5ee commit bd29e17
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -52,6 +62,12 @@ android {
}

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

buildConfigField(
type ="String",
name = "CI_INFO",
value = "\"${ciProperties.getOrDefault("ci.info", "local")}\""
)
}

androidResources {
Expand Down

0 comments on commit bd29e17

Please sign in to comment.