Skip to content

Commit 3af136f

Browse files
qwwdfsadturansky
andauthored
Kts transition (#2261)
* Kotlin DSL - 'reactive:reactor' * Kotlin DSL - 'reactive:jdk9' * Kotlin DSL - 'kotlinx-coroutines-slf4j' * Kotlin DSL - 'kotlinx-coroutines-guava' * Plugin repo management in 'pluginManagement' block * Remove redundant stdlib dependencies (#2253) Co-authored-by: Victor Turansky <[email protected]>
1 parent d2ed1d8 commit 3af136f

File tree

15 files changed

+92
-111
lines changed

15 files changed

+92
-111
lines changed

buildSrc/build.gradle.kts

+1-17
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,6 @@
44

55
import java.util.*
66

7-
buildscript {
8-
val cacheRedirectorEnabled = System.getenv("CACHE_REDIRECTOR")?.toBoolean() == true
9-
10-
if (cacheRedirectorEnabled) {
11-
println("Redirecting repositories for buildSrc buildscript")
12-
}
13-
14-
repositories {
15-
if (cacheRedirectorEnabled) {
16-
maven("https://cache-redirector.jetbrains.com/plugins.gradle.org/m2")
17-
} else {
18-
maven("https://plugins.gradle.org/m2")
19-
}
20-
}
21-
}
22-
237
plugins {
248
`kotlin-dsl`
259
}
@@ -42,7 +26,7 @@ kotlinDslPluginOptions {
4226
experimentalWarning.set(false)
4327
}
4428

45-
private val props = Properties().apply {
29+
val props = Properties().apply {
4630
file("../gradle.properties").inputStream().use { load(it) }
4731
}
4832

buildSrc/settings.gradle.kts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
pluginManagement {
6+
repositories {
7+
val cacheRedirectorEnabled = System.getenv("CACHE_REDIRECTOR")?.toBoolean() == true
8+
9+
if (cacheRedirectorEnabled) {
10+
println("Redirecting repositories for buildSrc buildscript")
11+
12+
maven("https://cache-redirector.jetbrains.com/plugins.gradle.org/m2")
13+
} else {
14+
maven("https://plugins.gradle.org/m2")
15+
}
16+
}
17+
}

gradle/compile-common.gradle

-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
*/
44

55
kotlin.sourceSets {
6-
commonMain.dependencies {
7-
api "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"
8-
}
9-
106
commonTest.dependencies {
117
api "org.jetbrains.kotlin:kotlin-test-common:$kotlin_version"
128
api "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlin_version"

gradle/compile-js-multiplatform.gradle

-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ kotlin {
2626
}
2727

2828
sourceSets {
29-
jsMain.dependencies {
30-
api "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
31-
}
32-
3329
jsTest.dependencies {
3430
api "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
3531
}

gradle/compile-js.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
apply plugin: 'org.jetbrains.kotlin.js'
88

99
dependencies {
10-
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
1110
testImplementation "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
1211
}
1312

gradle/compile-jvm-multiplatform.gradle

-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ kotlin {
1010
fromPreset(presets.jvm, 'jvm')
1111
}
1212
sourceSets {
13-
jvmMain.dependencies {
14-
api 'org.jetbrains.kotlin:kotlin-stdlib'
15-
}
16-
1713
jvmTest.dependencies {
1814
api "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
1915
// Workaround to make addSuppressed work in tests

gradle/compile-jvm.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ sourceCompatibility = 1.6
1010
targetCompatibility = 1.6
1111

1212
dependencies {
13-
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
1413
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
1514
// Workaround to make addSuppressed work in tests
1615
testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

integration/kotlinx-coroutines-guava/build.gradle

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
val guavaVersion = "28.0-jre"
6+
7+
dependencies {
8+
compile("com.google.guava:guava:$guavaVersion")
9+
}
10+
11+
externalDocumentationLink(
12+
url = "https://google.github.io/guava/releases/$guavaVersion/api/docs/"
13+
)

integration/kotlinx-coroutines-slf4j/build.gradle

-17
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
dependencies {
6+
compile("org.slf4j:slf4j-api:1.7.25")
7+
testCompile("io.github.microutils:kotlin-logging:1.5.4")
8+
testRuntime("ch.qos.logback:logback-classic:1.2.3")
9+
testRuntime("ch.qos.logback:logback-core:1.2.3")
10+
}
11+
12+
externalDocumentationLink(
13+
url = "https://www.slf4j.org/apidocs/"
14+
)

reactive/kotlinx-coroutines-jdk9/build.gradle

-24
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
dependencies {
6+
compile(project(":kotlinx-coroutines-reactive"))
7+
compile("org.reactivestreams:reactive-streams-flow-adapters:${version("reactive_streams")}")
8+
}
9+
10+
tasks {
11+
compileKotlin {
12+
kotlinOptions.jvmTarget = "9"
13+
}
14+
15+
compileTestKotlin {
16+
kotlinOptions.jvmTarget = "9"
17+
}
18+
}
19+
20+
externalDocumentationLink(
21+
url = "https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/Flow.html"
22+
)

reactive/kotlinx-coroutines-reactor/build.gradle

-23
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
val reactorVersion = version("reactor")
6+
7+
dependencies {
8+
compile("io.projectreactor:reactor-core:$reactorVersion")
9+
compile(project(":kotlinx-coroutines-reactive"))
10+
}
11+
12+
13+
tasks {
14+
compileKotlin {
15+
kotlinOptions.jvmTarget = "1.8"
16+
}
17+
18+
compileTestKotlin {
19+
kotlinOptions.jvmTarget = "1.8"
20+
}
21+
}
22+
23+
externalDocumentationLink(
24+
url = "https://projectreactor.io/docs/core/$reactorVersion/api/"
25+
)

0 commit comments

Comments
 (0)