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 {
9
9
}
10
10
11
11
val cacheRedirectorEnabled = System .getenv(" CACHE_REDIRECTOR" )?.toBoolean() == true
12
+ val buildSnapshotTrain = properties[" build_snapshot_train" ]?.toString()?.toBoolean() == true
12
13
13
14
repositories {
14
15
if (cacheRedirectorEnabled) {
@@ -20,6 +21,10 @@ repositories {
20
21
maven(" https://dl.bintray.com/kotlin/kotlin-eap" )
21
22
maven(" https://dl.bintray.com/kotlin/kotlin-dev" )
22
23
}
24
+
25
+ if (buildSnapshotTrain) {
26
+ mavenLocal()
27
+ }
23
28
}
24
29
25
30
kotlinDslPluginOptions {
@@ -30,8 +35,14 @@ val props = Properties().apply {
30
35
file(" ../gradle.properties" ).inputStream().use { load(it) }
31
36
}
32
37
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
+ }
35
46
36
47
dependencies {
37
48
implementation(kotlin(" gradle-plugin" , version(" kotlin" )))
Original file line number Diff line number Diff line change 1
1
/*
2
2
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
-
5
4
pluginManagement {
5
+ val build_snapshot_train: String? by settings
6
6
repositories {
7
7
val cacheRedirectorEnabled = System .getenv(" CACHE_REDIRECTOR" )?.toBoolean() == true
8
-
9
8
if (cacheRedirectorEnabled) {
10
9
println (" Redirecting repositories for buildSrc buildscript" )
11
-
12
10
maven(" https://cache-redirector.jetbrains.com/plugins.gradle.org/m2" )
13
11
} else {
14
12
maven(" https://plugins.gradle.org/m2" )
15
13
}
14
+ if (build_snapshot_train?.toBoolean() == true ) {
15
+ mavenLocal()
16
+ }
16
17
}
17
18
}
You can’t perform that action at this time.
0 commit comments