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
2 files changed, 28 insertions, 0 deletions
diff --git a/build-logic/android-plugins/build.gradle.kts b/build-logic/android-plugins/build.gradle.kts
index 1ffce784..15314965 100644
--- a/build-logic/android-plugins/build.gradle.kts
+++ b/build-logic/android-plugins/build.gradle.kts
@@ -39,3 +39,17 @@ 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 6d2606ed..3984c2a6 100644
--- a/build-logic/kotlin-plugins/build.gradle.kts
+++ b/build-logic/kotlin-plugins/build.gradle.kts
@@ -30,3 +30,17 @@ 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)
+ }
+ }
+}