-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsettings.gradle.kts
49 lines (43 loc) · 1.25 KB
/
settings.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
rootProject.name = "sse"
include(":common")
include(":jvm-okhttp")
include(":sample-jvm")
val kotlinVersion = "1.3.70"
gradle.projectsLoaded {
allprojects {
extra["kotlinVersion"] = kotlinVersion
extra["coroutinesVersion"] = "1.3.3"
extra["okHttpVersion"] = "3.12.0"
extra["okioVersion"] = "2.2.2"
extra["cliktVersion"] = "1.5.0"
extra["gsonVersion"] = "2.8.5"
repositories {
jcenter()
kotlinx()
}
}
}
pluginManagement {
repositories {
gradlePluginPortal()
jcenter()
kotlinx()
}
resolutionStrategy {
eachPlugin {
when (requested.id.id) {
kotlin("jvm"),
kotlin("platform.common"),
kotlin("platform.jvm"),
kotlin("platform.android"),
kotlin("platform.js")
-> useKotlinModule("gradle-plugin")
}
}
}
}
fun kotlin(module: String) = "org.jetbrains.kotlin.$module"
fun PluginResolveDetails.useKotlinModule(module: String) =
useModule("org.jetbrains.kotlin:kotlin-$module:${requested.version ?: kotlinVersion}")
fun RepositoryHandler.kotlinx() =
maven { url = uri("https://dl.bintray.com/kotlin/kotlinx") }