Skip to content

Kts transition #2261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@

import java.util.*

buildscript {
val cacheRedirectorEnabled = System.getenv("CACHE_REDIRECTOR")?.toBoolean() == true

if (cacheRedirectorEnabled) {
println("Redirecting repositories for buildSrc buildscript")
}

repositories {
if (cacheRedirectorEnabled) {
maven("https://cache-redirector.jetbrains.com/plugins.gradle.org/m2")
} else {
maven("https://plugins.gradle.org/m2")
}
}
}

plugins {
`kotlin-dsl`
}
Expand All @@ -42,7 +26,7 @@ kotlinDslPluginOptions {
experimentalWarning.set(false)
}

private val props = Properties().apply {
val props = Properties().apply {
file("../gradle.properties").inputStream().use { load(it) }
}

Expand Down
17 changes: 17 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

pluginManagement {
repositories {
val cacheRedirectorEnabled = System.getenv("CACHE_REDIRECTOR")?.toBoolean() == true

if (cacheRedirectorEnabled) {
println("Redirecting repositories for buildSrc buildscript")

maven("https://cache-redirector.jetbrains.com/plugins.gradle.org/m2")
} else {
maven("https://plugins.gradle.org/m2")
}
}
}
4 changes: 0 additions & 4 deletions gradle/compile-common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
*/

kotlin.sourceSets {
commonMain.dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"
}

commonTest.dependencies {
api "org.jetbrains.kotlin:kotlin-test-common:$kotlin_version"
api "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlin_version"
Expand Down
4 changes: 0 additions & 4 deletions gradle/compile-js-multiplatform.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ kotlin {
}

sourceSets {
jsMain.dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
}

jsTest.dependencies {
api "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
}
Expand Down
1 change: 0 additions & 1 deletion gradle/compile-js.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
apply plugin: 'org.jetbrains.kotlin.js'

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
testImplementation "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
}

Expand Down
4 changes: 0 additions & 4 deletions gradle/compile-jvm-multiplatform.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ kotlin {
fromPreset(presets.jvm, 'jvm')
}
sourceSets {
jvmMain.dependencies {
api 'org.jetbrains.kotlin:kotlin-stdlib'
}

jvmTest.dependencies {
api "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
// Workaround to make addSuppressed work in tests
Expand Down
1 change: 0 additions & 1 deletion gradle/compile-jvm.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ sourceCompatibility = 1.6
targetCompatibility = 1.6

dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
// Workaround to make addSuppressed work in tests
testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
Expand Down
16 changes: 0 additions & 16 deletions integration/kotlinx-coroutines-guava/build.gradle

This file was deleted.

13 changes: 13 additions & 0 deletions integration/kotlinx-coroutines-guava/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

val guavaVersion = "28.0-jre"

dependencies {
compile("com.google.guava:guava:$guavaVersion")
}

externalDocumentationLink(
url = "https://google.github.io/guava/releases/$guavaVersion/api/docs/"
)
17 changes: 0 additions & 17 deletions integration/kotlinx-coroutines-slf4j/build.gradle

This file was deleted.

14 changes: 14 additions & 0 deletions integration/kotlinx-coroutines-slf4j/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

dependencies {
compile("org.slf4j:slf4j-api:1.7.25")
testCompile("io.github.microutils:kotlin-logging:1.5.4")
testRuntime("ch.qos.logback:logback-classic:1.2.3")
testRuntime("ch.qos.logback:logback-core:1.2.3")
}

externalDocumentationLink(
url = "https://www.slf4j.org/apidocs/"
)
24 changes: 0 additions & 24 deletions reactive/kotlinx-coroutines-jdk9/build.gradle

This file was deleted.

22 changes: 22 additions & 0 deletions reactive/kotlinx-coroutines-jdk9/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

dependencies {
compile(project(":kotlinx-coroutines-reactive"))
compile("org.reactivestreams:reactive-streams-flow-adapters:${version("reactive_streams")}")
}

tasks {
compileKotlin {
kotlinOptions.jvmTarget = "9"
}

compileTestKotlin {
kotlinOptions.jvmTarget = "9"
}
}

externalDocumentationLink(
url = "https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/Flow.html"
)
23 changes: 0 additions & 23 deletions reactive/kotlinx-coroutines-reactor/build.gradle

This file was deleted.

25 changes: 25 additions & 0 deletions reactive/kotlinx-coroutines-reactor/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

val reactorVersion = version("reactor")

dependencies {
compile("io.projectreactor:reactor-core:$reactorVersion")
compile(project(":kotlinx-coroutines-reactive"))
}


tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}

compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}

externalDocumentationLink(
url = "https://projectreactor.io/docs/core/$reactorVersion/api/"
)