aboutsummaryrefslogtreecommitdiff
path: root/build-logic
diff options
context:
space:
mode:
Diffstat (limited to 'build-logic')
-rw-r--r--build-logic/android-plugins/build.gradle.kts14
-rw-r--r--build-logic/kotlin-plugins/build.gradle.kts14
-rw-r--r--build-logic/settings.gradle.kts14
3 files changed, 13 insertions, 29 deletions
diff --git a/build-logic/android-plugins/build.gradle.kts b/build-logic/android-plugins/build.gradle.kts
index 95fb1e2f..ae6121b0 100644
--- a/build-logic/android-plugins/build.gradle.kts
+++ b/build-logic/android-plugins/build.gradle.kts
@@ -59,17 +59,3 @@ dependencies {
implementation(libs.build.semver)
implementation(libs.build.sentry)
}
-
-configurations.all {
- resolutionStrategy.eachDependency {
- val overrideName =
- "GRADLE_VERSION_OVERRIDE_${requested.group.replace('.', '_')}_${requested.name}"
- val overridenVersion = System.getenv(overrideName)
- if (!overridenVersion.isNullOrEmpty()) {
- project.logger.lifecycle(
- "Overriding dependency ${requested.group}:${requested.name} to version $overridenVersion"
- )
- useVersion(overridenVersion)
- }
- }
-}
diff --git a/build-logic/kotlin-plugins/build.gradle.kts b/build-logic/kotlin-plugins/build.gradle.kts
index 71230f52..bfd54dc0 100644
--- a/build-logic/kotlin-plugins/build.gradle.kts
+++ b/build-logic/kotlin-plugins/build.gradle.kts
@@ -59,17 +59,3 @@ dependencies {
implementation(libs.build.kotlin)
implementation(libs.build.spotless)
}
-
-configurations.all {
- resolutionStrategy.eachDependency {
- val overrideName =
- "GRADLE_VERSION_OVERRIDE_${requested.group.replace('.', '_')}_${requested.name}"
- val overridenVersion = System.getenv(overrideName)
- if (!overridenVersion.isNullOrEmpty()) {
- project.logger.lifecycle(
- "Overriding dependency ${requested.group}:${requested.name} to version $overridenVersion"
- )
- useVersion(overridenVersion)
- }
- }
-}
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")