diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c4f5401d..3e8ffe949 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Pending changes +### API breaking changes + +- [#677](https://github.com/bumble-tech/appyx/pull/677) – Moved Builder, SimpleBuilder, Interactor to separate module + +### Fixed + - [#670](https://github.com/bumble-tech/appyx/pull/670) - Fixes ios lifecycle - [#673](https://github.com/bumble-tech/appyx/pull/673) – Fix canHandeBackPress typo diff --git a/documentation/releases/2.0.0-alpha11.md b/documentation/releases/2.0.0-alpha11.md index 002a45105..2e8ae1f18 100644 --- a/documentation/releases/2.0.0-alpha11.md +++ b/documentation/releases/2.0.0-alpha11.md @@ -11,4 +11,21 @@ interface AppyxComponent /*...*/ { /*...*/ - fun canHandeBackPress(): StateFlow + fun canHandleBackPress(): StateFlow +``` + +## Moved `Builder`, `SimpleBuilder`, and `Interactor` + +If you were depending on these classes being part of appyx-navigation, you’ll now need to get them from "com.bumble.appyx:utils-ribs-helpers:$version". + +```diff ++ implementation("com.bumble.appyx:utils-ribs-helpers:$version") + +- import com.bumble.appyx.navigation.builder.Builder ++ import com.bumble.appyx.utils.ribshelpers.builder.Builder + +- import com.bumble.appyx.navigation.builder.SimpleBuilder ++ import com.bumble.appyx.utils.ribshelpers.builder.SimpleBuilder + +- import com.bumble.appyx.navigation.clienthelper.interactor.Interactor ++ import com.bumble.appyx.utils.ribshelpers.interactor.Interactor ``` \ No newline at end of file diff --git a/documentation/releases/downloads.md b/documentation/releases/downloads.md index a574f6b07..a5defc870 100644 --- a/documentation/releases/downloads.md +++ b/documentation/releases/downloads.md @@ -218,6 +218,16 @@ dependencies { } ``` +### RIBs like helpers + +Adds client code helper classes like `Builder`, `SimpleBuilder`, and `Interactor` + +```kotlin +dependencies { + implementation("com.bumble.appyx:utils-ribs-helpers:$version") +} +``` + ### Testing diff --git a/settings.gradle.kts b/settings.gradle.kts index 207e2c844..b626ac48c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -85,6 +85,7 @@ include( ":utils:interop-ribs", ":utils:interop-rx2", ":utils:interop-rx3", + ":utils:ribs-helpers", ":utils:testing-junit4", ":utils:testing-junit5", ":utils:testing-ui", diff --git a/utils/ribs-helpers/build.gradle.kts b/utils/ribs-helpers/build.gradle.kts new file mode 100644 index 000000000..f6b4225b6 --- /dev/null +++ b/utils/ribs-helpers/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + id("com.bumble.appyx.android.library") + id("appyx-publish-android") +} + +publishingPlugin { + artifactId = "utils-ribs-helpers" +} + +appyx { + namespace.set("com.bumble.appyx.utils.ribs.helpers") +} + +dependencies { + api(project(":appyx-navigation:appyx-navigation")) + api(project(":appyx-interactions:appyx-interactions")) +} diff --git a/utils/ribs-helpers/lint-baseline.xml b/utils/ribs-helpers/lint-baseline.xml new file mode 100644 index 000000000..3755e80a7 --- /dev/null +++ b/utils/ribs-helpers/lint-baseline.xml @@ -0,0 +1,4 @@ + + + + diff --git a/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/builder/Builder.kt b/utils/ribs-helpers/src/main/kotlin/com/bumble/appyx/utils/ribshelpers/builder/Builder.kt similarity index 85% rename from appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/builder/Builder.kt rename to utils/ribs-helpers/src/main/kotlin/com/bumble/appyx/utils/ribshelpers/builder/Builder.kt index 0d785e9a2..43958b193 100644 --- a/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/builder/Builder.kt +++ b/utils/ribs-helpers/src/main/kotlin/com/bumble/appyx/utils/ribshelpers/builder/Builder.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.builder +package com.bumble.appyx.utils.ribshelpers.builder import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node diff --git a/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/builder/SimpleBuilder.kt b/utils/ribs-helpers/src/main/kotlin/com/bumble/appyx/utils/ribshelpers/builder/SimpleBuilder.kt similarity index 85% rename from appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/builder/SimpleBuilder.kt rename to utils/ribs-helpers/src/main/kotlin/com/bumble/appyx/utils/ribshelpers/builder/SimpleBuilder.kt index c13dfa1ed..225501a1a 100644 --- a/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/builder/SimpleBuilder.kt +++ b/utils/ribs-helpers/src/main/kotlin/com/bumble/appyx/utils/ribshelpers/builder/SimpleBuilder.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.builder +package com.bumble.appyx.utils.ribshelpers.builder import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node diff --git a/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/clienthelper/interactor/Interactor.kt b/utils/ribs-helpers/src/main/kotlin/com/bumble/appyx/utils/ribshelpers/interactor/Interactor.kt similarity index 90% rename from appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/clienthelper/interactor/Interactor.kt rename to utils/ribs-helpers/src/main/kotlin/com/bumble/appyx/utils/ribshelpers/interactor/Interactor.kt index ec40fe7e2..e0182aca9 100644 --- a/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/clienthelper/interactor/Interactor.kt +++ b/utils/ribs-helpers/src/main/kotlin/com/bumble/appyx/utils/ribshelpers/interactor/Interactor.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.clienthelper.interactor +package com.bumble.appyx.utils.ribshelpers.interactor import com.bumble.appyx.interactions.core.plugin.SavesInstanceState import com.bumble.appyx.navigation.children.ChildAware diff --git a/utils/testing-unit-common/build.gradle.kts b/utils/testing-unit-common/build.gradle.kts index 964eb0a21..520484449 100644 --- a/utils/testing-unit-common/build.gradle.kts +++ b/utils/testing-unit-common/build.gradle.kts @@ -17,6 +17,7 @@ appyx { dependencies { api(project(":appyx-navigation:appyx-navigation")) + api(project(":utils:ribs-helpers")) implementation(project(":utils:utils-customisations")) implementation(libs.kotlin.test) } diff --git a/utils/testing-unit-common/src/main/kotlin/com/bumble/appyx/utils/testing/unit/common/util/InteropBuilderStub.kt b/utils/testing-unit-common/src/main/kotlin/com/bumble/appyx/utils/testing/unit/common/util/InteropBuilderStub.kt index 26b37586d..28914f268 100644 --- a/utils/testing-unit-common/src/main/kotlin/com/bumble/appyx/utils/testing/unit/common/util/InteropBuilderStub.kt +++ b/utils/testing-unit-common/src/main/kotlin/com/bumble/appyx/utils/testing/unit/common/util/InteropBuilderStub.kt @@ -1,9 +1,9 @@ package com.bumble.appyx.utils.testing.unit.common.util -import com.bumble.appyx.navigation.builder.Builder import com.bumble.appyx.navigation.lifecycle.Lifecycle import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node +import com.bumble.appyx.utils.ribshelpers.builder.Builder import kotlin.test.assertEquals import kotlin.test.assertTrue diff --git a/utils/testing-unit-common/src/main/kotlin/com/bumble/appyx/utils/testing/unit/common/util/InteropSimpleBuilderStub.kt b/utils/testing-unit-common/src/main/kotlin/com/bumble/appyx/utils/testing/unit/common/util/InteropSimpleBuilderStub.kt index d7c2c6e96..8a774d0b3 100644 --- a/utils/testing-unit-common/src/main/kotlin/com/bumble/appyx/utils/testing/unit/common/util/InteropSimpleBuilderStub.kt +++ b/utils/testing-unit-common/src/main/kotlin/com/bumble/appyx/utils/testing/unit/common/util/InteropSimpleBuilderStub.kt @@ -1,9 +1,9 @@ package com.bumble.appyx.utils.testing.unit.common.util -import com.bumble.appyx.navigation.builder.SimpleBuilder import com.bumble.appyx.navigation.lifecycle.Lifecycle import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node +import com.bumble.appyx.utils.ribshelpers.builder.SimpleBuilder import kotlin.test.assertEquals import kotlin.test.assertTrue