Skip to content

Commit c2d1e4c

Browse files
committed
chore: make mavenLocal repository opt-in via USE_MAVEN_LOCAL / useMavenLocal
1 parent 78e046a commit c2d1e4c

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

ApiDemos/project/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ buildscript {
3333

3434
allprojects {
3535
repositories {
36-
mavenLocal()
36+
if (providers.gradleProperty("useMavenLocal").orNull == "true" ||
37+
providers.environmentVariable("USE_MAVEN_LOCAL").orNull == "true") {
38+
mavenLocal()
39+
}
3740
google()
3841
mavenCentral()
3942
}

settings.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ pluginManagement {
2828
dependencyResolutionManagement {
2929
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
3030
repositories {
31+
if (providers.gradleProperty("useMavenLocal").orNull == "true" ||
32+
providers.environmentVariable("USE_MAVEN_LOCAL").orNull == "true") {
33+
mavenLocal()
34+
}
3135
google()
3236
mavenCentral()
3337
}

0 commit comments

Comments
 (0)