Fix coroutines issue #46

Merged
altavir merged 1 commits from dev into master 2022-06-12 14:47:34 +03:00
5 changed files with 17 additions and 11 deletions
Showing only changes of commit f283d4d454 - Show all commits

View File

@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
### Changed ### Changed
- Coroutines tests are applied only when explicit `useCoroutines` is used.
### Deprecated ### Deprecated
@ -29,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Atomicfu support inside the plugin - Atomicfu support inside the plugin
### Fixed ### Fixed
- Rollback coroutines to 1.6.1
### Security ### Security

View File

@ -1,7 +1,7 @@
plugins { plugins {
alias(libs.plugins.changelog) alias(libs.plugins.changelog)
alias(libs.plugins.dokka) alias(libs.plugins.dokka)
//alias(libs.plugins.kotlin.jvm) apply false alias(libs.plugins.kotlin.jvm)
`java-gradle-plugin` `java-gradle-plugin`
`kotlin-dsl` `kotlin-dsl`
`maven-publish` `maven-publish`
@ -32,7 +32,7 @@ dependencies {
implementation(libs.changelog.gradle) implementation(libs.changelog.gradle)
implementation(libs.dokka.gradle) implementation(libs.dokka.gradle)
implementation(libs.kotlin.jupyter.gradle) implementation(libs.kotlin.jupyter.gradle)
//implementation(libs.kotlin.serialization) implementation(libs.kotlin.serialization)
implementation(libs.kotlinx.html) implementation(libs.kotlinx.html)
implementation("org.tomlj:tomlj:1.0.0") implementation("org.tomlj:tomlj:1.0.0")
// // nexus publishing plugin // // nexus publishing plugin

View File

@ -8,7 +8,7 @@ dokka = "1.6.21"
kotlin-jupyter = "0.11.0-106" kotlin-jupyter = "0.11.0-106"
kotlinx-benchmark = "0.4.2" kotlinx-benchmark = "0.4.2"
kotlinx-cli = "0.3.4" kotlinx-cli = "0.3.4"
kotlinx-coroutines = "1.6.2" kotlinx-coroutines = "1.6.1"
kotlinx-datetime = "0.3.3" kotlinx-datetime = "0.3.3"
kotlinx-html = "0.7.5" kotlinx-html = "0.7.5"
kotlinx-knit = "0.4.0" kotlinx-knit = "0.4.0"

View File

@ -50,11 +50,18 @@ public class KScienceExtension(public val project: Project) {
version: String = KScienceVersions.coroutinesVersion, version: String = KScienceVersions.coroutinesVersion,
sourceSet: DependencySourceSet = DependencySourceSet.MAIN, sourceSet: DependencySourceSet = DependencySourceSet.MAIN,
configuration: DependencyConfiguration = DependencyConfiguration.API, configuration: DependencyConfiguration = DependencyConfiguration.API,
): Unit = project.useCommonDependency( ): Unit {
"org.jetbrains.kotlinx:kotlinx-coroutines-core:$version", project.useCommonDependency(
dependencySourceSet = sourceSet, "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version",
dependencyConfiguration = configuration dependencySourceSet = sourceSet,
) dependencyConfiguration = configuration
)
project.useCommonDependency(
"org.jetbrains.kotlinx:kotlinx-coroutines-test:$version",
dependencySourceSet = DependencySourceSet.TEST,
dependencyConfiguration = DependencyConfiguration.IMPLEMENTATION
)
}
/** /**
* Use core serialization library and configure targets * Use core serialization library and configure targets

View File

@ -36,7 +36,6 @@ public fun Project.configureKScience(
dependencies { dependencies {
implementation(kotlin("test-junit5")) implementation(kotlin("test-junit5"))
implementation("org.junit.jupiter:junit-jupiter:${KScienceVersions.junit}") implementation("org.junit.jupiter:junit-jupiter:${KScienceVersions.junit}")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:${KScienceVersions.coroutinesVersion}")
} }
} }
@ -82,7 +81,6 @@ public fun Project.configureKScience(
sourceSets["test"].apply { sourceSets["test"].apply {
dependencies { dependencies {
implementation(kotlin("test-js")) implementation(kotlin("test-js"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:${KScienceVersions.coroutinesVersion}")
} }
} }
@ -124,7 +122,6 @@ public fun Project.configureKScience(
dependencies { dependencies {
implementation(kotlin("test-common")) implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common")) implementation(kotlin("test-annotations-common"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:${KScienceVersions.coroutinesVersion}")
} }
} }
val jvmMain by getting val jvmMain by getting