From 9d3312611e3f16414d60a717770befeedec9319b Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 25 May 2022 17:59:04 +0530 Subject: Instate shadow jobs (#1923) --- build-logic/kotlin-plugins/build.gradle.kts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'build-logic/kotlin-plugins') 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) + } + } +} -- cgit v1.2.3