Skip to content

Commit d017d88

Browse files
committed
Fix proxy repositories settings
1 parent d8c2ced commit d017d88

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gradle-conventions-settings/src/main/kotlin/conventions-repositories.settings.gradle.kts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ pluginManagement {
8787

8888
repositories {
8989
val useProxyProperty = getLocalProperties()["kotlinx.rpc.useProxyRepositories"] as String?
90-
val useProxy = useProxyProperty == null || useProxyProperty == "true"
90+
val useProxy = (useProxyProperty == null || useProxyProperty == "true") &&
91+
settings.providers.gradleProperty("kotlinx.rpc.useProxyRepositories").orNull != "false"
9192

9293
if (useProxy) {
9394
buildDeps()
@@ -194,11 +195,12 @@ settings.extra["useProxyRepositories"] = localProps.isUsingProxyRepositories()
194195

195196
gradle.rootProject {
196197
allprojects {
198+
val useProxy = localProps.isUsingProxyRepositories() &&
199+
project.findProperty("kotlinx.rpc.useProxyRepositories") != "false"
200+
197201
this.extra["spacePassword"] = getSpacePassword()
198202
this.extra["localProperties"] = localProps
199-
this.extra["useProxyRepositories"] = localProps.isUsingProxyRepositories()
200-
201-
val useProxy = localProps.isUsingProxyRepositories()
203+
this.extra["useProxyRepositories"] = useProxy
202204

203205
val globalRootDir = findGlobalRootDirPath()
204206

0 commit comments

Comments
 (0)