Skip to content
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

Kotest 4.1.0 #138

Merged
merged 8 commits into from
Jun 28, 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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
branches:
- dev
- master
- release/*

jobs:

Expand Down
16 changes: 8 additions & 8 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ object Libs {
const val jUnit5Vintage = "org.junit.vintage:junit-vintage-engine:$version"
}

object Kotest {
private const val version = "4.1.0"
const val assertions = "io.kotest:kotest-assertions-core-jvm:$version"
const val consoleRunner = "io.kotest:kotest-runner-console-jvm:$version"
const val properties = "io.kotest:kotest-property-jvm:$version"
const val runner = "io.kotest:kotest-runner-junit5-jvm:$version"
}

object Kotlin {
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Versions.kotlin}"
const val reflect = "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlin}"
Expand All @@ -168,14 +176,6 @@ object Libs {
const val test = "org.jetbrains.kotlin:kotlin-test:${Versions.kotlin}"
const val testCommon = "org.jetbrains.kotlin:kotlin-test-common:${Versions.kotlin}"
}

object Kotest {
private const val version = "4.0.5"
const val assertions = "io.kotest:kotest-assertions-core-jvm:$version"
const val properties = "io.kotest:kotest-property-jvm:$version"
const val runner = "io.kotest:kotest-runner-junit5-jvm:$version"
}

object Kotlinx {

object Coroutines {
Expand Down
16 changes: 10 additions & 6 deletions buildSrc/src/main/kotlin/DocsTasks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,25 @@ fun File.updateLibraryVersions(): File {
Libs.RickBusarow.Dispatch.detekt.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.espresso.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.extensions.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.lifecycleExtensions.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.lifecycle.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.lifecycleExtensions.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.viewModel.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.Test.core.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.Test.jUnit4.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.Test.jUnit5.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.Test.core.toDependencyMatcher(),
Libs.RickBusarow.Dispatch.core.toDependencyMatcher()
Libs.RickBusarow.Dispatch.core.toDependencyMatcher(),
Libs.Kotest.assertions.toDependencyMatcher(),
Libs.Kotest.consoleRunner.toDependencyMatcher(),
Libs.Kotest.properties.toDependencyMatcher(),
Libs.Kotest.runner.toDependencyMatcher()
)

forEachLine { originalLine ->

val newLine = dependencyMatchers.firstOrNull { matcher ->

matcher.regex.matches(originalLine)
}
matcher.regex.matches(originalLine)
}
?.let { matcher ->

originalLine.replace(matcher)
Expand Down Expand Up @@ -209,5 +213,5 @@ private fun String.replace(
}

private fun String.removeVersionSuffix(): String = split(":").subList(0, 2)
.joinToString(":")
.joinToString(":") + ":"

1 change: 1 addition & 0 deletions dispatch-android-espresso/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit4)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.runner)
testImplementation(Libs.MockK.core)
testImplementation(Libs.Robolectric.core)
Expand Down
1 change: 1 addition & 0 deletions dispatch-android-espresso/samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit4)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-android-lifecycle-extensions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)
testImplementation(Libs.Kotlinx.Coroutines.test)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ dependencies {
implementation(project(":dispatch-test-junit5"))
testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-android-lifecycle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)
testImplementation(Libs.Kotlinx.Coroutines.test)
Expand Down
1 change: 1 addition & 0 deletions dispatch-android-lifecycle/samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ dependencies {
implementation(project(":dispatch-test-junit5"))
testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-android-viewmodel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)
testImplementation(Libs.Kotlinx.Coroutines.test)
Expand Down
1 change: 1 addition & 0 deletions dispatch-android-viewmodel/samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-core/samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-detekt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies {
testImplementation(Libs.Detekt.test)
testImplementation(Libs.JUnit.jUnit5Api)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-detekt/samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-internal-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies {
implementation(Libs.JUnit.jUnit5)
implementation(Libs.JUnit.jUnit5Vintage)
implementation(Libs.Kotest.assertions)
implementation(Libs.Kotest.consoleRunner)
implementation(Libs.Kotest.properties)
implementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ dependencies {
testImplementation(Libs.JUnit.jUnit4)
testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)
testImplementation(Libs.Kotlinx.Coroutines.test)
Expand Down
1 change: 1 addition & 0 deletions dispatch-test-junit4/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies {

implementation(Libs.JUnit.jUnit4)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-test-junit4/samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit4)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-test-junit5/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies {

implementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-test-junit5/samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies {
implementation(Libs.JUnit.jUnit5)
implementation(Libs.JUnit.jUnit5Vintage)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
1 change: 1 addition & 0 deletions dispatch-test/samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies {

testImplementation(Libs.JUnit.jUnit5)
testImplementation(Libs.Kotest.assertions)
testImplementation(Libs.Kotest.consoleRunner)
testImplementation(Libs.Kotest.properties)
testImplementation(Libs.Kotest.runner)

Expand Down
4 changes: 2 additions & 2 deletions docs/dokka/dispatch-android-espresso/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ dependencies {
// core
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7")
implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta03")
implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta04")

androidTestImplementation("com.rickbusarow.dispatch:dispatch-android-espresso:1.0.0-beta03")
androidTestImplementation("com.rickbusarow.dispatch:dispatch-android-espresso:1.0.0-beta04")

// android
androidTestImplementation("androidx.test:runner:1.2.0")
Expand Down
2 changes: 1 addition & 1 deletion docs/dokka/dispatch-android-lifecycle-extensions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ dependencies {

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7")
implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions:1.0.0-beta03")
implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions:1.0.0-beta04")

implementation("androidx.lifecycle:lifecycle-common:2.2.0")
}
Expand Down
2 changes: 1 addition & 1 deletion docs/dokka/dispatch-android-viewmodel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ dependencies {

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7")
implementation("com.rickbusarow.dispatch:dispatch-android-viewmodel:1.0.0-beta03")
implementation("com.rickbusarow.dispatch:dispatch-android-viewmodel:1.0.0-beta04")
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/dokka/dispatch-detekt/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ allprojects {
dependencies {
detekt("io.gitlab.arturbosch.detekt:detekt-cli:1.9.1")

detektPlugins("com.rickbusarow.dispatch:dispatch-detekt:1.0.0-beta03")
detektPlugins("com.rickbusarow.dispatch:dispatch-detekt:1.0.0-beta04")
}
}
```
Expand Down