From eb578dfdf40fb9aec94564bf6b62dcf08d2e90f0 Mon Sep 17 00:00:00 2001 From: Rick Busarow Date: Sun, 16 May 2021 23:20:35 -0500 Subject: [PATCH] Dispatch bom (#225) * Bump com.diffplug.spotless from 5.12.4 to 5.12.5 (#220) * introduce a BOM * update main project README Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- CHANGELOG.md | 5 ++ README.md | 19 ++++--- buildSrc/src/main/kotlin/DocsTasks.kt | 19 +++---- buildSrc/src/main/kotlin/Modules.kt | 1 + dispatch-android-espresso/README.md | 5 +- .../README.md | 3 +- dispatch-android-lifecycle/README.md | 3 +- dispatch-android-viewmodel/README.md | 3 +- dispatch-bom/build.gradle.kts | 50 +++++++++++++++++++ dispatch-bom/gradle.properties | 17 +++++++ dispatch-core/README.md | 3 +- dispatch-detekt/README.md | 3 +- dispatch-test-junit4/README.md | 11 ++-- dispatch-test-junit5/README.md | 11 ++-- dispatch-test/README.md | 5 +- docs/CHANGELOG.md | 5 ++ docs/dispatch-android-espresso.md | 5 +- docs/dispatch-android-lifecycle-extensions.md | 3 +- docs/dispatch-android-lifecycle.md | 3 +- docs/dispatch-android-viewmodel.md | 3 +- docs/dispatch-core.md | 3 +- docs/dispatch-detekt.md | 3 +- docs/dispatch-test-junit4.md | 11 ++-- docs/dispatch-test-junit5.md | 11 ++-- docs/dispatch-test.md | 5 +- docs/index.md | 19 ++++--- gradle.properties | 2 +- gradle/libs.versions.toml | 2 +- settings.gradle.kts | 1 + 29 files changed, 169 insertions(+), 65 deletions(-) create mode 100644 dispatch-bom/build.gradle.kts create mode 100644 dispatch-bom/gradle.properties diff --git a/CHANGELOG.md b/CHANGELOG.md index 69f3d87fa..ebd1ca7aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change log for Dispatch +## Version 1.0.0-RC01 + +* Update coroutines to [1.5.0](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.5.0) +* Add a BOM for unified dependency versions ([#219](https://github.com/RBusarow/Dispatch/issues/219)) + ## Version 1.0.0-beta09 * [CoroutineTestExtension] now creates a new [scope][CoroutineTestExtension.scope] instance for each test. diff --git a/README.md b/README.md index 08de098a2..1b9d995a3 100644 --- a/README.md +++ b/README.md @@ -363,16 +363,19 @@ dependencies { // core coroutines implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") + + // a BOM ensures that all artifacts used from the library are of the same version + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) // everything provides :core via "api", so you only need this if you have no other "implementation" dispatch artifacts - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-core") // LifecycleCoroutineScope for Android Fragments, Activities, etc. - implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle") // lifecycleScope extension function with a settable factory. Use this if you don't DI your CoroutineScopes // This provides :dispatch-android-lifecycle via "api", so you don't need to declare both - implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions") // ViewModelScope for Android ViewModels - implementation("com.rickbusarow.dispatch:dispatch-android-viewmodel:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-android-viewmodel") /* jvm testing @@ -381,15 +384,15 @@ dependencies { // core coroutines-test testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.0") // you only need this if you don't have the -junit4 or -junit5 artifacts - testImplementation("com.rickbusarow.dispatch:dispatch-test:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test") // CoroutineTestRule and :dispatch-test // This provides :dispatch-test via "api", so you don't need to declare both // This can be used at the same time as :dispatch-test-junit5 - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4") // CoroutineTest, CoroutineTestExtension, and :dispatch-test // This provides :dispatch-test via "api", so you don't need to declare both // This can be used at the same time as :dispatch-test-junit4 - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5") /* Android testing */ @@ -398,7 +401,7 @@ dependencies { androidTestImplementation("androidx.test:runner:1.3.0") androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0") // IdlingDispatcher, IdlingDispatcherProvider, and IdlingCoroutineScope - androidTestImplementation("com.rickbusarow.dispatch:dispatch-android-espresso:1.0.0-beta09") + androidTestImplementation("com.rickbusarow.dispatch:dispatch-android-espresso") } ``` diff --git a/buildSrc/src/main/kotlin/DocsTasks.kt b/buildSrc/src/main/kotlin/DocsTasks.kt index 14e39fad1..dc88c3a9d 100644 --- a/buildSrc/src/main/kotlin/DocsTasks.kt +++ b/buildSrc/src/main/kotlin/DocsTasks.kt @@ -159,15 +159,16 @@ fun File.updateLibraryVersions(): File { "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0".toDependencyMatcher(), "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0".toDependencyMatcher(), "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.0".toDependencyMatcher(), - "com.rickbusarow.dispatch:dispatch-detekt:1.0.0-beta09".toDependencyMatcher(), - "com.rickbusarow.dispatch:dispatch-android-espresso:1.0.0-beta09".toDependencyMatcher(), - "com.rickbusarow.dispatch:dispatch-android-lifecycle:1.0.0-beta09".toDependencyMatcher(), - "com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions:1.0.0-beta09".toDependencyMatcher(), - "com.rickbusarow.dispatch:dispatch-android-viewmodel:1.0.0-beta09".toDependencyMatcher(), - "com.rickbusarow.dispatch:dispatch-test:1.0.0-beta09".toDependencyMatcher(), - "com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-beta09".toDependencyMatcher(), - "com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-beta09".toDependencyMatcher(), - "com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09".toDependencyMatcher(), + "com.rickbusarow.dispatch:dispatch-detekt:1.0.0-RC01".toDependencyMatcher(), + "com.rickbusarow.dispatch:dispatch-android-espresso:1.0.0-RC01".toDependencyMatcher(), + "com.rickbusarow.dispatch:dispatch-android-lifecycle:1.0.0-RC01".toDependencyMatcher(), + "com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions:1.0.0-RC01".toDependencyMatcher(), + "com.rickbusarow.dispatch:dispatch-android-viewmodel:1.0.0-RC01".toDependencyMatcher(), + "com.rickbusarow.dispatch:dispatch-test:1.0.0-RC01".toDependencyMatcher(), + "com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-RC01".toDependencyMatcher(), + "com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-RC01".toDependencyMatcher(), + "com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01".toDependencyMatcher(), + "com.rickbusarow.dispatch:dispatch-core:1.0.0-RC01".toDependencyMatcher(), "com.rickbusarow.hermit:hermit-core:0.9.2".toDependencyMatcher(), "com.rickbusarow.hermit:hermit-junit4:0.9.2".toDependencyMatcher(), "com.rickbusarow.hermit:hermit-junit5:0.9.2".toDependencyMatcher(), diff --git a/buildSrc/src/main/kotlin/Modules.kt b/buildSrc/src/main/kotlin/Modules.kt index acd1447d4..868da64e6 100644 --- a/buildSrc/src/main/kotlin/Modules.kt +++ b/buildSrc/src/main/kotlin/Modules.kt @@ -27,6 +27,7 @@ object Modules { ":dispatch-android-lifecycle:samples", ":dispatch-android-viewmodel", ":dispatch-android-viewmodel:samples", + ":dispatch-bom", ":dispatch-core", ":dispatch-core:samples", ":dispatch-detekt", diff --git a/dispatch-android-espresso/README.md b/dispatch-android-espresso/README.md index e5d353377..ff6857ec8 100644 --- a/dispatch-android-espresso/README.md +++ b/dispatch-android-espresso/README.md @@ -90,9 +90,10 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-core") - androidTestImplementation("com.rickbusarow.dispatch:dispatch-android-espresso:1.0.0-beta09") + androidTestImplementation("com.rickbusarow.dispatch:dispatch-android-espresso") // android androidTestImplementation("androidx.test:runner:1.3.0") diff --git a/dispatch-android-lifecycle-extensions/README.md b/dispatch-android-lifecycle-extensions/README.md index e148c41a0..fdfb6a9bb 100644 --- a/dispatch-android-lifecycle-extensions/README.md +++ b/dispatch-android-lifecycle-extensions/README.md @@ -141,7 +141,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions") implementation("androidx.lifecycle:lifecycle-common:2.3.1") } diff --git a/dispatch-android-lifecycle/README.md b/dispatch-android-lifecycle/README.md index 38f39e7ee..0c8bda1d6 100644 --- a/dispatch-android-lifecycle/README.md +++ b/dispatch-android-lifecycle/README.md @@ -59,7 +59,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle") implementation("androidx.lifecycle:lifecycle-common:2.3.1") } ``` diff --git a/dispatch-android-viewmodel/README.md b/dispatch-android-viewmodel/README.md index dac33b247..e3355fd53 100644 --- a/dispatch-android-viewmodel/README.md +++ b/dispatch-android-viewmodel/README.md @@ -178,7 +178,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("com.rickbusarow.dispatch:dispatch-android-viewmodel:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-android-viewmodel") } ``` diff --git a/dispatch-bom/build.gradle.kts b/dispatch-bom/build.gradle.kts new file mode 100644 index 000000000..cc81fdf64 --- /dev/null +++ b/dispatch-bom/build.gradle.kts @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2021 Rick Busarow + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + `java-platform` + id("com.vanniktech.maven.publish") +} + +version = libs.versions.versionName.get() + +val bomProject = project + +rootProject + .subprojects + .filter { it.includeInBom() } + .forEach { bomProject.evaluationDependsOn(it.path) } + +dependencies { + constraints { + rootProject + .subprojects + .filter { it.includeInBom() } + .forEach { api(project(it.path)) } + } +} + +publishing { + publications { + create("DispatchBom") { + from(components["javaPlatform"]) + } + } +} + + +fun Project.includeInBom() = !path.contains("sample") && + !path.contains("internal") && + this != bomProject diff --git a/dispatch-bom/gradle.properties b/dispatch-bom/gradle.properties new file mode 100644 index 000000000..38f456bc9 --- /dev/null +++ b/dispatch-bom/gradle.properties @@ -0,0 +1,17 @@ +# +# Copyright (C) 2021 Rick Busarow +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +POM_ARTIFACT_ID=dispatch-bom +POM_NAME=dispatch-bom +POM_PACKAGING=jar diff --git a/dispatch-core/README.md b/dispatch-core/README.md index 988e2fba9..0c3cb78d8 100644 --- a/dispatch-core/README.md +++ b/dispatch-core/README.md @@ -203,7 +203,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-core") } ``` diff --git a/dispatch-detekt/README.md b/dispatch-detekt/README.md index 171e9b1a6..c09fbfb04 100644 --- a/dispatch-detekt/README.md +++ b/dispatch-detekt/README.md @@ -34,7 +34,8 @@ allprojects { dependencies { detekt("io.gitlab.arturbosch.detekt:detekt-cli:1.16.0") - detektPlugins("com.rickbusarow.dispatch:dispatch-detekt:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + detektPlugins("com.rickbusarow.dispatch:dispatch-detekt") } } ``` diff --git a/dispatch-test-junit4/README.md b/dispatch-test-junit4/README.md index 1bd2ba84f..137857a98 100644 --- a/dispatch-test-junit4/README.md +++ b/dispatch-test-junit4/README.md @@ -73,10 +73,11 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-core") // the junit4 artifact also provides the dispatch-test artifact - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.0") } ``` @@ -97,11 +98,11 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-RC01") // the junit4 and junit5 artifacts also provides the dispatch-test artifact - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-beta09") - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-RC01") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-RC01") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.0") } ``` diff --git a/dispatch-test-junit5/README.md b/dispatch-test-junit5/README.md index 279f76dfa..e90891949 100644 --- a/dispatch-test-junit5/README.md +++ b/dispatch-test-junit5/README.md @@ -103,10 +103,11 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-core") // the junit5 artifact also provides the dispatch-test artifact - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.0") testImplementation("org.junit.jupiter:junit-jupiter:5.7.1") } @@ -128,11 +129,11 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-RC01") // the junit4 and junit5 artifacts also provides the dispatch-test artifact - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-beta09") - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-RC01") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-RC01") testImplementation("org.junit.jupiter:junit-jupiter:5.7.1") testImplementation("org.junit.vintage:junit-vintage-engine:5.7.1") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.0") diff --git a/dispatch-test/README.md b/dispatch-test/README.md index 93d2347ab..7d0339ff5 100644 --- a/dispatch-test/README.md +++ b/dispatch-test/README.md @@ -122,9 +122,10 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-core") - testImplementation("com.rickbusarow.dispatch:dispatch-test:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.0") } ``` diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 69f3d87fa..ebd1ca7aa 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,10 @@ # Change log for Dispatch +## Version 1.0.0-RC01 + +* Update coroutines to [1.5.0](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.5.0) +* Add a BOM for unified dependency versions ([#219](https://github.com/RBusarow/Dispatch/issues/219)) + ## Version 1.0.0-beta09 * [CoroutineTestExtension] now creates a new [scope][CoroutineTestExtension.scope] instance for each test. diff --git a/docs/dispatch-android-espresso.md b/docs/dispatch-android-espresso.md index c0c838f10..60af9497f 100644 --- a/docs/dispatch-android-espresso.md +++ b/docs/dispatch-android-espresso.md @@ -90,9 +90,10 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-core") - androidTestImplementation("com.rickbusarow.dispatch:dispatch-android-espresso:1.0.0-beta09") + androidTestImplementation("com.rickbusarow.dispatch:dispatch-android-espresso") // android androidTestImplementation("androidx.test:runner:1.3.0") diff --git a/docs/dispatch-android-lifecycle-extensions.md b/docs/dispatch-android-lifecycle-extensions.md index 3960331dd..1d670b620 100644 --- a/docs/dispatch-android-lifecycle-extensions.md +++ b/docs/dispatch-android-lifecycle-extensions.md @@ -141,7 +141,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") - implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions") implementation("androidx.lifecycle:lifecycle-common:2.3.1") } diff --git a/docs/dispatch-android-lifecycle.md b/docs/dispatch-android-lifecycle.md index 7440592f4..f65026877 100644 --- a/docs/dispatch-android-lifecycle.md +++ b/docs/dispatch-android-lifecycle.md @@ -59,7 +59,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") - implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle") implementation("androidx.lifecycle:lifecycle-common:2.3.1") } ``` diff --git a/docs/dispatch-android-viewmodel.md b/docs/dispatch-android-viewmodel.md index 3e98fbe03..d7c4d8d93 100644 --- a/docs/dispatch-android-viewmodel.md +++ b/docs/dispatch-android-viewmodel.md @@ -178,7 +178,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") - implementation("com.rickbusarow.dispatch:dispatch-android-viewmodel:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-android-viewmodel") } ``` diff --git a/docs/dispatch-core.md b/docs/dispatch-core.md index a58c441c5..e485c466c 100644 --- a/docs/dispatch-core.md +++ b/docs/dispatch-core.md @@ -203,7 +203,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-core") } ``` diff --git a/docs/dispatch-detekt.md b/docs/dispatch-detekt.md index 171e9b1a6..c09fbfb04 100644 --- a/docs/dispatch-detekt.md +++ b/docs/dispatch-detekt.md @@ -34,7 +34,8 @@ allprojects { dependencies { detekt("io.gitlab.arturbosch.detekt:detekt-cli:1.16.0") - detektPlugins("com.rickbusarow.dispatch:dispatch-detekt:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + detektPlugins("com.rickbusarow.dispatch:dispatch-detekt") } } ``` diff --git a/docs/dispatch-test-junit4.md b/docs/dispatch-test-junit4.md index 1d9fb369b..811d87008 100644 --- a/docs/dispatch-test-junit4.md +++ b/docs/dispatch-test-junit4.md @@ -73,10 +73,11 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-core") // the junit4 artifact also provides the dispatch-test artifact - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3") } ``` @@ -97,11 +98,11 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-RC01") // the junit4 and junit5 artifacts also provides the dispatch-test artifact - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-beta09") - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-RC01") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-RC01") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3") } ``` diff --git a/docs/dispatch-test-junit5.md b/docs/dispatch-test-junit5.md index 52397ce0a..5b8ea90a8 100644 --- a/docs/dispatch-test-junit5.md +++ b/docs/dispatch-test-junit5.md @@ -103,10 +103,11 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-core") // the junit5 artifact also provides the dispatch-test artifact - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3") testImplementation("org.junit.jupiter:junit-jupiter:5.7.1") } @@ -128,11 +129,11 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-RC01") // the junit4 and junit5 artifacts also provides the dispatch-test artifact - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-beta09") - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-RC01") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-RC01") testImplementation("org.junit.jupiter:junit-jupiter:5.7.1") testImplementation("org.junit.vintage:junit-vintage-engine:5.7.1") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3") diff --git a/docs/dispatch-test.md b/docs/dispatch-test.md index f9bf0c6cf..c208a844c 100644 --- a/docs/dispatch-test.md +++ b/docs/dispatch-test.md @@ -122,9 +122,10 @@ dependencies { // core implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) + implementation("com.rickbusarow.dispatch:dispatch-core") - testImplementation("com.rickbusarow.dispatch:dispatch-test:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3") } ``` diff --git a/docs/index.md b/docs/index.md index af2374c3f..4ef0b50f1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -363,16 +363,19 @@ dependencies { // core coroutines implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") + + // a BOM ensures that all artifacts used from the library are of the same version + implementation(platform("com.rickbusarow.dispatch:dispatch-bom:1.0.0-RC01")) // everything provides :core via "api", so you only need this if you have no other "implementation" dispatch artifacts - implementation("com.rickbusarow.dispatch:dispatch-core:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-core") // LifecycleCoroutineScope for Android Fragments, Activities, etc. - implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle") // lifecycleScope extension function with a settable factory. Use this if you don't DI your CoroutineScopes // This provides :dispatch-android-lifecycle via "api", so you don't need to declare both - implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-android-lifecycle-extensions") // ViewModelScope for Android ViewModels - implementation("com.rickbusarow.dispatch:dispatch-android-viewmodel:1.0.0-beta09") + implementation("com.rickbusarow.dispatch:dispatch-android-viewmodel") /* jvm testing @@ -381,15 +384,15 @@ dependencies { // core coroutines-test testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3") // you only need this if you don't have the -junit4 or -junit5 artifacts - testImplementation("com.rickbusarow.dispatch:dispatch-test:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test") // CoroutineTestRule and :dispatch-test // This provides :dispatch-test via "api", so you don't need to declare both // This can be used at the same time as :dispatch-test-junit5 - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit4") // CoroutineTest, CoroutineTestExtension, and :dispatch-test // This provides :dispatch-test via "api", so you don't need to declare both // This can be used at the same time as :dispatch-test-junit4 - testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5:1.0.0-beta09") + testImplementation("com.rickbusarow.dispatch:dispatch-test-junit5") /* Android testing */ @@ -398,7 +401,7 @@ dependencies { androidTestImplementation("androidx.test:runner:1.3.0") androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0") // IdlingDispatcher, IdlingDispatcherProvider, and IdlingCoroutineScope - androidTestImplementation("com.rickbusarow.dispatch:dispatch-android-espresso:1.0.0-beta09") + androidTestImplementation("com.rickbusarow.dispatch:dispatch-android-espresso") } ``` diff --git a/gradle.properties b/gradle.properties index 651bd2f9c..77bdae0ce 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,7 +24,7 @@ android.enableJetifier=false android.lifecycleProcessor.incremental=true # Maven GROUP=com.rickbusarow.dispatch -VERSION_NAME=1.0.0-beta09 +VERSION_NAME=1.0.0-RC01 POM_DESCRIPTION=Quality of life coroutine utilities. POM_INCEPTION_YEAR=2019 POM_URL=https://github.com/rbusarow/Dispatch diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 100a93b0a..8440addae 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -26,7 +26,7 @@ spoon = "1.5.0" spotless = "5.10.1" targetSdk = "30" taskTree = "1.5" -versionName = "0.10.0" +versionName = "1.0.0-RC01" [libraries] diff --git a/settings.gradle.kts b/settings.gradle.kts index a3a9d46ba..220e2ba25 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -71,6 +71,7 @@ include(":dispatch-android-lifecycle-extensions:samples") include(":dispatch-android-lifecycle:samples") include(":dispatch-android-viewmodel") include(":dispatch-android-viewmodel:samples") +include(":dispatch-bom") include(":dispatch-core") include(":dispatch-test") include(":dispatch-test-junit4")