Fix coroutines issue

This commit is contained in:
Alexander Nozik 2022-06-12 14:46:28 +03:00
parent 89bc45cd1c
commit f283d4d454
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357
5 changed files with 17 additions and 11 deletions

View File

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

View File

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

View File

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

View File

@ -50,11 +50,18 @@ public class KScienceExtension(public val project: Project) {
version: String = KScienceVersions.coroutinesVersion,
sourceSet: DependencySourceSet = DependencySourceSet.MAIN,
configuration: DependencyConfiguration = DependencyConfiguration.API,
): Unit = project.useCommonDependency(
"org.jetbrains.kotlinx:kotlinx-coroutines-core:$version",
dependencySourceSet = sourceSet,
dependencyConfiguration = configuration
)
): Unit {
project.useCommonDependency(
"org.jetbrains.kotlinx:kotlinx-coroutines-core:$version",
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

View File

@ -36,7 +36,6 @@ public fun Project.configureKScience(
dependencies {
implementation(kotlin("test-junit5"))
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 {
dependencies {
implementation(kotlin("test-js"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:${KScienceVersions.coroutinesVersion}")
}
}
@ -124,7 +122,6 @@ public fun Project.configureKScience(
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:${KScienceVersions.coroutinesVersion}")
}
}
val jvmMain by getting