File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ plugins {
99}
1010
1111val cacheRedirectorEnabled = System .getenv(" CACHE_REDIRECTOR" )?.toBoolean() == true
12+ val buildSnapshotTrain = properties[" build_snapshot_train" ]?.toString()?.toBoolean() == true
1213
1314repositories {
1415 if (cacheRedirectorEnabled) {
@@ -20,6 +21,10 @@ repositories {
2021 maven(" https://dl.bintray.com/kotlin/kotlin-eap" )
2122 maven(" https://dl.bintray.com/kotlin/kotlin-dev" )
2223 }
24+
25+ if (buildSnapshotTrain) {
26+ mavenLocal()
27+ }
2328}
2429
2530kotlinDslPluginOptions {
@@ -30,8 +35,14 @@ val props = Properties().apply {
3035 file(" ../gradle.properties" ).inputStream().use { load(it) }
3136}
3237
33- fun version (target : String ): String =
34- props.getProperty(" ${target} _version" )
38+ fun version (target : String ): String {
39+ // Intercept reading from properties file
40+ if (target == " kotlin" ) {
41+ val snapshotVersion = properties[" kotlin_snapshot_version" ]
42+ if (snapshotVersion != null ) return snapshotVersion.toString()
43+ }
44+ return props.getProperty(" ${target} _version" )
45+ }
3546
3647dependencies {
3748 implementation(kotlin(" gradle-plugin" , version(" kotlin" )))
Original file line number Diff line number Diff line change 11/*
22 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33 */
4-
54pluginManagement {
5+ val build_snapshot_train: String? by settings
66 repositories {
77 val cacheRedirectorEnabled = System .getenv(" CACHE_REDIRECTOR" )?.toBoolean() == true
8-
98 if (cacheRedirectorEnabled) {
109 println (" Redirecting repositories for buildSrc buildscript" )
11-
1210 maven(" https://cache-redirector.jetbrains.com/plugins.gradle.org/m2" )
1311 } else {
1412 maven(" https://plugins.gradle.org/m2" )
1513 }
14+ if (build_snapshot_train?.toBoolean() == true ) {
15+ mavenLocal()
16+ }
1617 }
1718}
You can’t perform that action at this time.
0 commit comments