aboutsummaryrefslogtreecommitdiff
path: root/build-logic/settings.gradle.kts
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-06-12 16:31:42 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2022-06-12 16:31:42 +0530
commit68cf22fb75e72d373bd103bbd7993cd1bd9923e8 (patch)
treed268464dafa8eb9afd22d392e7e9e0460ad1dad8 /build-logic/settings.gradle.kts
parente07b239360e18de8aaf47d1772a17ed404ed83c9 (diff)
build-logic: rewrite version overrides to edit the version catalog
Diffstat (limited to 'build-logic/settings.gradle.kts')
-rw-r--r--build-logic/settings.gradle.kts14
1 files changed, 13 insertions, 1 deletions
diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts
index 2e9d12b3..be6946c3 100644
--- a/build-logic/settings.gradle.kts
+++ b/build-logic/settings.gradle.kts
@@ -27,7 +27,19 @@ dependencyResolutionManagement {
}
mavenCentral()
}
- versionCatalogs { create("libs") { from(files("../gradle/libs.versions.toml")) } }
+ versionCatalogs {
+ maybeCreate("libs").apply {
+ from(files("../gradle/libs.versions.toml"))
+ if (System.getenv("DEP_OVERRIDE") == "true") {
+ val overrides = System.getenv().filterKeys { it.startsWith("DEP_OVERRIDE_") }
+ for ((key, value) in overrides) {
+ val catalogKey = key.removePrefix("DEP_OVERRIDE_").toLowerCase()
+ println("Overriding $catalogKey with $value")
+ version(catalogKey, value)
+ }
+ }
+ }
+ }
}
include("android-plugins")