File tree 3 files changed +52
-3
lines changed
3 files changed +52
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ buildscript {
45
45
repositories {
46
46
mavenCentral()
47
47
maven { url " https://plugins.gradle.org/m2/" }
48
- maven { url " https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev " }
48
+ CommunityProjectsBuild . addDevRepositoryIfEnabled(delegate, project)
49
49
mavenLocal()
50
50
}
51
51
@@ -130,7 +130,7 @@ allprojects {
130
130
*/
131
131
google()
132
132
mavenCentral()
133
- maven { url " https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev " }
133
+ CommunityProjectsBuild . addDevRepositoryIfEnabled(delegate, project)
134
134
}
135
135
}
136
136
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ plugins {
10
10
11
11
val cacheRedirectorEnabled = System .getenv(" CACHE_REDIRECTOR" )?.toBoolean() == true
12
12
val buildSnapshotTrain = properties[" build_snapshot_train" ]?.toString()?.toBoolean() == true
13
+ val kotlinDevUrl = project.rootProject.properties[" kotlin_repo_url" ] as ? String
13
14
14
15
repositories {
15
16
mavenCentral()
@@ -18,7 +19,9 @@ repositories {
18
19
} else {
19
20
maven(" https://plugins.gradle.org/m2" )
20
21
}
21
- maven(" https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" )
22
+ if (! kotlinDevUrl.isNullOrEmpty()) {
23
+ maven(kotlinDevUrl)
24
+ }
22
25
if (buildSnapshotTrain) {
23
26
mavenLocal()
24
27
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2016-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
+ */
4
+ @file:JvmName(" CommunityProjectsBuild" )
5
+
6
+ import org.gradle.api.*
7
+ import org.gradle.api.artifacts.dsl.*
8
+ import java.net.*
9
+ import java.util.logging.*
10
+
11
+ private val LOGGER : Logger = Logger .getLogger(" Kotlin settings logger" )
12
+
13
+
14
+ /* *
15
+ * Functions in this file are responsible for configuring kotlinx.coroutines build against a custom dev version
16
+ * of Kotlin compiler.
17
+ * Such configuration is used in a composite community build of Kotlin in order to check whether not-yet-released changes
18
+ * are compatible with our libraries (aka "integration testing that substitues lack of unit testing").
19
+ */
20
+
21
+ /* *
22
+ * Should be used for running against of non-released Kotlin compiler on a system test level
23
+ * Kotlin compiler artifacts are expected to be downloaded from maven central by default.
24
+ * In case of compiling with not-published into the MC kotlin compiler artifacts, a kotlin_repo_url gradle parameter should be specified.
25
+ * To reproduce a build locally, a kotlin/dev repo should be passed
26
+ *
27
+ * @return an url for a kotlin compiler repository parametrized from command line nor gradle.properties, empty string otherwise
28
+ */
29
+ fun getKotlinDevRepositoryUrl (project : Project ): URI ? {
30
+ val url: String? = project.rootProject.properties[" kotlin_repo_url" ] as ? String
31
+ if (url != null ) {
32
+ LOGGER .info(""" Configured Kotlin Compiler repository url: '$url ' for project ${project.name} """ )
33
+ return URI .create(url)
34
+ }
35
+ return null
36
+ }
37
+
38
+ /* *
39
+ * Adds a kotlin-dev space repository with dev versions of Kotlin if Kotlin aggregate build is enabled
40
+ */
41
+ fun addDevRepositoryIfEnabled (rh : RepositoryHandler , project : Project ) {
42
+ val devRepoUrl = getKotlinDevRepositoryUrl(project) ? : return
43
+ rh.maven {
44
+ url = devRepoUrl
45
+ }
46
+ }
You can’t perform that action at this time.
0 commit comments