diff --git a/appyx-components/experimental/cards/android/build.gradle.kts b/appyx-components/experimental/cards/android/build.gradle.kts index 492c1b4b3..9ca00b770 100644 --- a/appyx-components/experimental/cards/android/build.gradle.kts +++ b/appyx-components/experimental/cards/android/build.gradle.kts @@ -12,8 +12,8 @@ dependencies { implementation(project(":demos:common")) - implementation(project(":appyx-interactions:android")) implementation(project(":appyx-interactions:appyx-interactions")) + implementation(project(":appyx-interactions:android-utils")) implementation(project(":appyx-components:experimental:cards:cards")) implementation(composeBom) diff --git a/appyx-components/experimental/cards/android/src/main/kotlin/com/bumble/appyx/components/experimental/cards/android/DatingCards.kt b/appyx-components/experimental/cards/android/src/main/kotlin/com/bumble/appyx/components/experimental/cards/android/DatingCards.kt index 711400b9f..a78e0887b 100644 --- a/appyx-components/experimental/cards/android/src/main/kotlin/com/bumble/appyx/components/experimental/cards/android/DatingCards.kt +++ b/appyx-components/experimental/cards/android/src/main/kotlin/com/bumble/appyx/components/experimental/cards/android/DatingCards.kt @@ -17,7 +17,7 @@ import com.bumble.appyx.demos.common.profile.ProfileCard import com.bumble.appyx.interactions.core.AppyxInteractionsContainer import com.bumble.appyx.interactions.core.gesture.GestureValidator.Companion.permissiveValidator import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup -import com.bumble.appyx.interactions.theme.appyx_dark +import com.bumble.appyx.interactions.utils.ui.theme.appyx_dark import kotlin.math.roundToInt @Composable diff --git a/appyx-components/experimental/promoter/android/build.gradle.kts b/appyx-components/experimental/promoter/android/build.gradle.kts index 5815e1091..6680c5220 100644 --- a/appyx-components/experimental/promoter/android/build.gradle.kts +++ b/appyx-components/experimental/promoter/android/build.gradle.kts @@ -9,8 +9,7 @@ appyx { dependencies { val composeBom = platform(libs.compose.bom) - - api(project(":appyx-interactions:android")) + api(project(":appyx-interactions:android-utils")) implementation(project(":appyx-interactions:appyx-interactions")) implementation(project(":appyx-components:experimental:promoter:promoter")) diff --git a/appyx-components/experimental/promoter/android/src/main/kotlin/com/bumble/appyx/components/experimental/promoter/android/PromoterExperiment.kt b/appyx-components/experimental/promoter/android/src/main/kotlin/com/bumble/appyx/components/experimental/promoter/android/PromoterExperiment.kt index 75279d2af..743d1c05b 100644 --- a/appyx-components/experimental/promoter/android/src/main/kotlin/com/bumble/appyx/components/experimental/promoter/android/PromoterExperiment.kt +++ b/appyx-components/experimental/promoter/android/src/main/kotlin/com/bumble/appyx/components/experimental/promoter/android/PromoterExperiment.kt @@ -29,12 +29,12 @@ import com.bumble.appyx.interactions.core.AppyxInteractionsContainer import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.IMMEDIATE import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.KEYFRAME import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup -import com.bumble.appyx.interactions.sample.InteractionTarget -import com.bumble.appyx.interactions.sample.InteractionTarget.Child1 -import com.bumble.appyx.interactions.sample.InteractionTarget.Child2 -import com.bumble.appyx.interactions.sample.InteractionTarget.Child3 -import com.bumble.appyx.interactions.sample.InteractionTarget.Child4 -import com.bumble.appyx.interactions.sample.android.Element +import com.bumble.appyx.interactions.utils.ui.Element +import com.bumble.appyx.interactions.utils.testing.TestTarget +import com.bumble.appyx.interactions.utils.testing.TestTarget.Child1 +import com.bumble.appyx.interactions.utils.testing.TestTarget.Child2 +import com.bumble.appyx.interactions.utils.testing.TestTarget.Child3 +import com.bumble.appyx.interactions.utils.testing.TestTarget.Child4 import kotlin.math.roundToInt @@ -47,7 +47,7 @@ fun PromoterExperiment(modifier: Modifier = Modifier) { val promoter = remember { Promoter( scope = coroutineScope, - model = PromoterModel(savedStateMap = null), + model = PromoterModel(savedStateMap = null), visualisation = { PromoterVisualisation( uiContext = it @@ -100,13 +100,13 @@ fun PromoterExperiment(modifier: Modifier = Modifier) { horizontalArrangement = Arrangement.Center ) { Button( - onClick = { promoter.addFirst(InteractionTarget.values().random(), KEYFRAME) } + onClick = { promoter.addFirst(TestTarget.entries.random(), KEYFRAME) } ) { Text("KEYFRAME") } Spacer(Modifier.size(24.dp)) Button( - onClick = { promoter.addFirst(InteractionTarget.values().random(), IMMEDIATE) } + onClick = { promoter.addFirst(TestTarget.entries.random(), IMMEDIATE) } ) { Text("IMMEDIATE") } diff --git a/appyx-components/experimental/puzzle15/android/build.gradle.kts b/appyx-components/experimental/puzzle15/android/build.gradle.kts index d4c271393..1891d3c35 100644 --- a/appyx-components/experimental/puzzle15/android/build.gradle.kts +++ b/appyx-components/experimental/puzzle15/android/build.gradle.kts @@ -9,5 +9,5 @@ appyx { dependencies { implementation(project(":appyx-components:experimental:puzzle15:puzzle15")) - implementation(project(":appyx-interactions:android")) + implementation(project(":appyx-interactions:android-utils")) } diff --git a/appyx-components/experimental/puzzle15/android/src/main/kotlin/com/bumble/appyx/components/experimental/puzzle15/android/Puzzle15.kt b/appyx-components/experimental/puzzle15/android/src/main/kotlin/com/bumble/appyx/components/experimental/puzzle15/android/Puzzle15.kt index 96b02033d..8039c8640 100644 --- a/appyx-components/experimental/puzzle15/android/src/main/kotlin/com/bumble/appyx/components/experimental/puzzle15/android/Puzzle15.kt +++ b/appyx-components/experimental/puzzle15/android/src/main/kotlin/com/bumble/appyx/components/experimental/puzzle15/android/Puzzle15.kt @@ -7,7 +7,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalDensity import com.bumble.appyx.components.experimental.puzzle15.ui.Puzzle15Ui -import com.bumble.appyx.interactions.theme.appyx_dark +import com.bumble.appyx.interactions.utils.ui.theme.appyx_dark import kotlin.math.roundToInt @Composable diff --git a/appyx-components/internal/test-drive/android/build.gradle.kts b/appyx-components/internal/test-drive/android/build.gradle.kts index aa9d0888c..62f76cdc2 100644 --- a/appyx-components/internal/test-drive/android/build.gradle.kts +++ b/appyx-components/internal/test-drive/android/build.gradle.kts @@ -10,6 +10,8 @@ appyx { dependencies { implementation(project(":appyx-components:internal:test-drive:test-drive")) - implementation(project(":appyx-interactions:android")) + implementation(project(":appyx-interactions:android-utils")) + androidTestImplementation(libs.compose.ui.test.junit4) + debugRuntimeOnly(libs.compose.ui.test.manifest) } diff --git a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/GesturesTest.kt b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/GesturesTest.kt index 3a3aa4824..494255324 100644 --- a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/GesturesTest.kt +++ b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/GesturesTest.kt @@ -7,7 +7,7 @@ import androidx.compose.ui.test.performTouchInput import androidx.compose.ui.unit.dp import com.bumble.appyx.components.internal.testdrive.TEST_DRIVE_EXPERIMENT_TEST_HELPER import com.bumble.appyx.components.internal.testdrive.android.helper.createTestDrive -import com.bumble.appyx.interactions.testing.snapshot +import com.bumble.appyx.interactions.utils.testing.snapshot import org.junit.Rule import org.junit.Test import org.junit.rules.TestName diff --git a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/KeyframesTest.kt b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/KeyframesTest.kt index 9c863db26..98362945f 100644 --- a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/KeyframesTest.kt +++ b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/KeyframesTest.kt @@ -6,7 +6,7 @@ import androidx.compose.ui.test.performClick import com.bumble.appyx.components.internal.testdrive.android.helper.createTestDrive import com.bumble.appyx.components.internal.testdrive.operation.Next import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.interactions.testing.snapshot +import com.bumble.appyx.interactions.utils.testing.snapshot import org.junit.Ignore import org.junit.Rule import org.junit.Test diff --git a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/KeyframesToUpdateTest.kt b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/KeyframesToUpdateTest.kt index 5acfd1834..f4b9d84c2 100644 --- a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/KeyframesToUpdateTest.kt +++ b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/KeyframesToUpdateTest.kt @@ -5,7 +5,7 @@ import androidx.compose.ui.test.junit4.createComposeRule import com.bumble.appyx.components.internal.testdrive.android.helper.createTestDrive import com.bumble.appyx.components.internal.testdrive.operation.Next import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.interactions.testing.snapshot +import com.bumble.appyx.interactions.utils.testing.snapshot import org.junit.Rule import org.junit.Test import org.junit.rules.TestName diff --git a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/UpdateTest.kt b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/UpdateTest.kt index ef4356a19..ef15e8e0a 100644 --- a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/UpdateTest.kt +++ b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/UpdateTest.kt @@ -4,7 +4,7 @@ import androidx.compose.ui.test.junit4.createComposeRule import com.bumble.appyx.components.internal.testdrive.android.helper.createTestDrive import com.bumble.appyx.components.internal.testdrive.operation.Next import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.interactions.testing.snapshot +import com.bumble.appyx.interactions.utils.testing.snapshot import org.junit.Rule import org.junit.Test import org.junit.rules.TestName diff --git a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/UpdateToKeyframesTest.kt b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/UpdateToKeyframesTest.kt index f7e9a411d..18f6fedec 100644 --- a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/UpdateToKeyframesTest.kt +++ b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/UpdateToKeyframesTest.kt @@ -4,7 +4,7 @@ import androidx.compose.ui.test.junit4.createComposeRule import com.bumble.appyx.components.internal.testdrive.android.helper.createTestDrive import com.bumble.appyx.components.internal.testdrive.operation.Next import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.interactions.testing.snapshot +import com.bumble.appyx.interactions.utils.testing.snapshot import org.junit.Rule import org.junit.Test import org.junit.rules.TestName diff --git a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/helper/TestDriveUtils.kt b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/helper/TestDriveUtils.kt index 49d365865..d83da3988 100644 --- a/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/helper/TestDriveUtils.kt +++ b/appyx-components/internal/test-drive/android/src/androidTest/kotlin/com/bumble/appyx/components/internal/testdrive/android/helper/TestDriveUtils.kt @@ -17,8 +17,8 @@ import com.bumble.appyx.components.internal.testdrive.TestDriveUi import com.bumble.appyx.components.internal.testdrive.ui.simple.TestDriveSimpleVisualisation import com.bumble.appyx.interactions.core.gesture.GestureValidator.Companion.permissiveValidator import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup -import com.bumble.appyx.interactions.sample.InteractionTarget -import com.bumble.appyx.interactions.theme.appyx_dark +import com.bumble.appyx.interactions.utils.testing.TestTarget +import com.bumble.appyx.interactions.utils.ui.theme.appyx_dark import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlin.math.roundToInt @@ -30,9 +30,9 @@ fun ComposeContentTestRule.createTestDrive( easing = LinearEasing ), uiAnimationSpec: SpringSpec = spring() -): TestDrive { +): TestDrive { val model = TestDriveModel( - element = InteractionTarget.Child1, + element = TestTarget.Child1, savedStateMap = null ) return TestDrive( diff --git a/appyx-components/internal/test-drive/android/src/main/kotlin/com/bumble/appyx/components/internal/testdrive/android/TestDriveExperiment.kt b/appyx-components/internal/test-drive/android/src/main/kotlin/com/bumble/appyx/components/internal/testdrive/android/TestDriveExperiment.kt index 16b2aa66d..02c9061e6 100644 --- a/appyx-components/internal/test-drive/android/src/main/kotlin/com/bumble/appyx/components/internal/testdrive/android/TestDriveExperiment.kt +++ b/appyx-components/internal/test-drive/android/src/main/kotlin/com/bumble/appyx/components/internal/testdrive/android/TestDriveExperiment.kt @@ -7,8 +7,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalDensity import com.bumble.appyx.components.internal.testdrive.TestDriveExperiment -import com.bumble.appyx.interactions.sample.InteractionTarget -import com.bumble.appyx.interactions.theme.appyx_dark +import com.bumble.appyx.interactions.utils.testing.TestTarget +import com.bumble.appyx.interactions.utils.ui.theme.appyx_dark import kotlin.math.roundToInt @Composable @@ -16,7 +16,7 @@ fun TestDriveExperiment(modifier: Modifier = Modifier) { TestDriveExperiment( screenWidthPx = (LocalConfiguration.current.screenWidthDp * LocalDensity.current.density).roundToInt(), screenHeightPx = (LocalConfiguration.current.screenHeightDp * LocalDensity.current.density).roundToInt(), - element = InteractionTarget.Child1, + element = TestTarget.Child1, modifier = modifier.fillMaxSize().background(appyx_dark), ) } diff --git a/appyx-components/standard/backstack/android/build.gradle.kts b/appyx-components/standard/backstack/android/build.gradle.kts index 5e3df6904..816914250 100644 --- a/appyx-components/standard/backstack/android/build.gradle.kts +++ b/appyx-components/standard/backstack/android/build.gradle.kts @@ -12,7 +12,7 @@ dependencies { androidTestImplementation(composeBom) androidTestImplementation(project(":appyx-components:standard:backstack:backstack")) - androidTestImplementation(project(":appyx-interactions:android")) + androidTestImplementation(project(":appyx-interactions:android-utils")) androidTestImplementation(project(":appyx-interactions:appyx-interactions")) androidTestImplementation(libs.compose.ui.test.junit4) androidTestImplementation(libs.junit.api) diff --git a/appyx-components/standard/backstack/android/src/androidTest/kotlin/com/bumble/appyx/components/backstack/android/BackStackTest.kt b/appyx-components/standard/backstack/android/src/androidTest/kotlin/com/bumble/appyx/components/backstack/android/BackStackTest.kt index 1ae2e568f..01f9552cf 100644 --- a/appyx-components/standard/backstack/android/src/androidTest/kotlin/com/bumble/appyx/components/backstack/android/BackStackTest.kt +++ b/appyx-components/standard/backstack/android/src/androidTest/kotlin/com/bumble/appyx/components/backstack/android/BackStackTest.kt @@ -14,10 +14,10 @@ import com.bumble.appyx.components.backstack.ui.stack3d.BackStack3D import com.bumble.appyx.interactions.core.model.transition.Operation import com.bumble.appyx.interactions.core.ui.Visualisation import com.bumble.appyx.interactions.core.ui.context.UiContext -import com.bumble.appyx.interactions.testing.TestTarget -import com.bumble.appyx.interactions.testing.setupAppyxComponent -import com.bumble.appyx.interactions.testing.waitUntilAnimationEnded -import com.bumble.appyx.interactions.testing.waitUntilAnimationStarted +import com.bumble.appyx.interactions.utils.testing.setupAppyxComponent +import com.bumble.appyx.interactions.utils.testing.waitUntilAnimationEnded +import com.bumble.appyx.interactions.utils.testing.waitUntilAnimationStarted +import com.bumble.appyx.interactions.utils.testing.TestTarget import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import org.junit.Assert diff --git a/appyx-components/standard/backstack/android/src/androidTest/kotlin/com/bumble/appyx/components/backstack/ui/parallax/BackStackParallaxTest.kt b/appyx-components/standard/backstack/android/src/androidTest/kotlin/com/bumble/appyx/components/backstack/ui/parallax/BackStackParallaxTest.kt index 93f9a09c9..fbe397c28 100644 --- a/appyx-components/standard/backstack/android/src/androidTest/kotlin/com/bumble/appyx/components/backstack/ui/parallax/BackStackParallaxTest.kt +++ b/appyx-components/standard/backstack/android/src/androidTest/kotlin/com/bumble/appyx/components/backstack/ui/parallax/BackStackParallaxTest.kt @@ -5,8 +5,8 @@ import com.bumble.appyx.components.backstack.BackStack import com.bumble.appyx.components.backstack.BackStackModel import com.bumble.appyx.components.backstack.operation.push import com.bumble.appyx.interactions.core.model.transition.Update -import com.bumble.appyx.interactions.testing.TestTarget -import com.bumble.appyx.interactions.testing.setupAppyxComponent +import com.bumble.appyx.interactions.utils.testing.setupAppyxComponent +import com.bumble.appyx.interactions.utils.testing.TestTarget import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import org.junit.Assert diff --git a/appyx-components/standard/spotlight/android/build.gradle.kts b/appyx-components/standard/spotlight/android/build.gradle.kts index e54bb673d..e37a3f51c 100644 --- a/appyx-components/standard/spotlight/android/build.gradle.kts +++ b/appyx-components/standard/spotlight/android/build.gradle.kts @@ -15,7 +15,7 @@ dependencies { androidTestImplementation(composeBom) androidTestImplementation(project(":appyx-components:standard:spotlight:spotlight")) - androidTestImplementation(project(":appyx-interactions:android")) + androidTestImplementation(project(":appyx-interactions:android-utils")) androidTestImplementation(libs.compose.ui.test.junit4) androidTestImplementation(libs.junit.api) androidTestImplementation(libs.compose.ui.test.manifest) diff --git a/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/SpotlightTest.kt b/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/SpotlightTest.kt index ff712a336..fc9f6bb02 100644 --- a/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/SpotlightTest.kt +++ b/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/SpotlightTest.kt @@ -7,9 +7,9 @@ import com.bumble.appyx.components.spotlight.SpotlightModel import com.bumble.appyx.components.spotlight.operation.last import com.bumble.appyx.components.spotlight.ui.slider.SpotlightSlider import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.interactions.testing.TestTarget -import com.bumble.appyx.interactions.testing.setupAppyxComponent -import com.bumble.appyx.interactions.testing.waitUntilAnimationEnded +import com.bumble.appyx.interactions.utils.testing.TestTarget +import com.bumble.appyx.interactions.utils.testing.setupAppyxComponent +import com.bumble.appyx.interactions.utils.testing.waitUntilAnimationEnded import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import org.junit.Assert.assertEquals diff --git a/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/SpotlightViewpointTest.kt b/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/SpotlightViewpointTest.kt index 771ef3a1a..16d3f3574 100644 --- a/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/SpotlightViewpointTest.kt +++ b/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/SpotlightViewpointTest.kt @@ -4,17 +4,17 @@ import androidx.compose.ui.geometry.Offset import androidx.compose.ui.test.hasContentDescription import androidx.compose.ui.test.junit4.createComposeRule import androidx.compose.ui.test.performTouchInput -import com.bumble.appyx.components.spotlight.operation.next import com.bumble.appyx.components.spotlight.android.utils.SPOTLIGHT_EXPERIMENT_TEST_HELPER import com.bumble.appyx.components.spotlight.android.utils.createSpotlight +import com.bumble.appyx.components.spotlight.operation.next import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.interactions.sample.InteractionTarget.Child1 -import com.bumble.appyx.interactions.sample.InteractionTarget.Child2 -import com.bumble.appyx.interactions.sample.InteractionTarget.Child3 -import com.bumble.appyx.interactions.sample.InteractionTarget.Child4 -import com.bumble.appyx.interactions.sample.InteractionTarget.Child5 -import com.bumble.appyx.interactions.sample.InteractionTarget.Child6 -import com.bumble.appyx.interactions.testing.snapshot +import com.bumble.appyx.interactions.utils.testing.TestTarget.Child1 +import com.bumble.appyx.interactions.utils.testing.TestTarget.Child2 +import com.bumble.appyx.interactions.utils.testing.TestTarget.Child3 +import com.bumble.appyx.interactions.utils.testing.TestTarget.Child4 +import com.bumble.appyx.interactions.utils.testing.TestTarget.Child5 +import com.bumble.appyx.interactions.utils.testing.TestTarget.Child6 +import com.bumble.appyx.interactions.utils.testing.snapshot import org.junit.Ignore import org.junit.Rule import org.junit.Test diff --git a/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/utils/SpotlightUtils.kt b/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/utils/SpotlightUtils.kt index 394a1cb0d..4ba16e3ab 100644 --- a/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/utils/SpotlightUtils.kt +++ b/appyx-components/standard/spotlight/android/src/androidTest/kotlin/com/bumble/appyx/components/spotlight/android/utils/SpotlightUtils.kt @@ -15,20 +15,20 @@ import com.bumble.appyx.components.spotlight.Spotlight import com.bumble.appyx.components.spotlight.SpotlightModel import com.bumble.appyx.components.spotlight.ui.slider.SpotlightSlider import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup -import com.bumble.appyx.interactions.sample.InteractionTarget -import com.bumble.appyx.interactions.sample.android.Element -import com.bumble.appyx.interactions.sample.android.SampleAppyxContainer -import com.bumble.appyx.interactions.theme.appyx_dark +import com.bumble.appyx.interactions.utils.testing.TestTarget +import com.bumble.appyx.interactions.utils.ui.Element +import com.bumble.appyx.interactions.utils.ui.SampleAppyxContainer +import com.bumble.appyx.interactions.utils.ui.theme.appyx_dark import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers fun ComposeContentTestRule.createSpotlight( - items: List, + items: List, animationSpec: AnimationSpec = tween( durationMillis = 1000, easing = LinearEasing ) -): Spotlight { +): Spotlight { val model = SpotlightModel( items = items, savedStateMap = null diff --git a/appyx-interactions/android-utils/build.gradle.kts b/appyx-interactions/android-utils/build.gradle.kts new file mode 100644 index 000000000..e7eabd8be --- /dev/null +++ b/appyx-interactions/android-utils/build.gradle.kts @@ -0,0 +1,26 @@ +plugins { + id("com.bumble.appyx.android.library") +} + +appyx { + namespace.set("com.bumble.appyx.interactions.utils") + + buildFeatures { + compose.set(true) + kotlinParcelize.set(true) + } +} + +dependencies { + + api(project(":appyx-interactions:appyx-interactions")) + api(libs.compose.material3) + + val composeBom = platform(libs.compose.bom) + + implementation(composeBom) + implementation(libs.androidx.lifecycle.java8) + implementation(libs.compose.foundation) + implementation(libs.compose.ui.test.junit4) + implementation(libs.androidx.test.espresso.core) +} diff --git a/appyx-interactions/android-utils/lint-baseline.xml b/appyx-interactions/android-utils/lint-baseline.xml new file mode 100644 index 000000000..f30ba1a9e --- /dev/null +++ b/appyx-interactions/android-utils/lint-baseline.xml @@ -0,0 +1,4 @@ + + + + diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/ComposeContentTestRuleExt.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/ComposeContentTestRuleExt.kt similarity index 89% rename from appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/ComposeContentTestRuleExt.kt rename to appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/ComposeContentTestRuleExt.kt index 6c36a0240..65bb7799e 100644 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/ComposeContentTestRuleExt.kt +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/ComposeContentTestRuleExt.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.interactions.testing +package com.bumble.appyx.interactions.utils.testing import androidx.compose.ui.test.junit4.ComposeContentTestRule import com.bumble.appyx.interactions.core.model.BaseAppyxComponent diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/Snapshot.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/Snapshot.kt similarity index 91% rename from appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/Snapshot.kt rename to appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/Snapshot.kt index 787c5f086..7d3159b65 100644 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/Snapshot.kt +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/Snapshot.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.interactions.testing +package com.bumble.appyx.interactions.utils.testing import android.os.Build import androidx.annotation.RequiresApi diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/TestTarget.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/TestTarget.kt similarity index 68% rename from appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/TestTarget.kt rename to appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/TestTarget.kt index f46d9648d..e80adbb17 100644 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/TestTarget.kt +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/TestTarget.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.interactions.testing +package com.bumble.appyx.interactions.utils.testing enum class TestTarget { Child1, Child2, Child3, Child4, Child5, Child6, Child7, Child8, Child9, Child10 diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/Utils.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/Utils.kt similarity index 93% rename from appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/Utils.kt rename to appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/Utils.kt index cd109fc1f..258a8a42d 100644 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/testing/Utils.kt +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/testing/Utils.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.interactions.testing +package com.bumble.appyx.interactions.utils.testing import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -14,8 +14,8 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.test.junit4.ComposeContentTestRule import com.bumble.appyx.interactions.core.model.BaseAppyxComponent import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup -import com.bumble.appyx.interactions.sample.android.SampleAppyxContainer -import com.bumble.appyx.interactions.theme.appyx_dark +import com.bumble.appyx.interactions.utils.ui.SampleAppyxContainer +import com.bumble.appyx.interactions.utils.ui.theme.appyx_dark import kotlin.random.Random fun ComposeContentTestRule.setupAppyxComponent( diff --git a/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/Colors.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/Colors.kt new file mode 100644 index 000000000..47cbd13b2 --- /dev/null +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/Colors.kt @@ -0,0 +1,36 @@ +package com.bumble.appyx.interactions.utils.ui + +import com.bumble.appyx.interactions.utils.ui.theme.atomic_tangerine +import com.bumble.appyx.interactions.utils.ui.theme.manatee +import com.bumble.appyx.interactions.utils.ui.theme.md_amber_500 +import com.bumble.appyx.interactions.utils.ui.theme.md_blue_500 +import com.bumble.appyx.interactions.utils.ui.theme.md_blue_grey_500 +import com.bumble.appyx.interactions.utils.ui.theme.md_cyan_500 +import com.bumble.appyx.interactions.utils.ui.theme.md_grey_500 +import com.bumble.appyx.interactions.utils.ui.theme.md_indigo_500 +import com.bumble.appyx.interactions.utils.ui.theme.md_light_blue_500 +import com.bumble.appyx.interactions.utils.ui.theme.md_light_green_500 +import com.bumble.appyx.interactions.utils.ui.theme.md_lime_500 +import com.bumble.appyx.interactions.utils.ui.theme.md_pink_500 +import com.bumble.appyx.interactions.utils.ui.theme.md_teal_500 +import com.bumble.appyx.interactions.utils.ui.theme.silver_sand +import com.bumble.appyx.interactions.utils.ui.theme.sizzling_red + +val colors = listOf( + manatee, + sizzling_red, + atomic_tangerine, + silver_sand, + md_pink_500, + md_indigo_500, + md_blue_500, + md_light_blue_500, + md_cyan_500, + md_teal_500, + md_light_green_500, + md_lime_500, + md_amber_500, + md_grey_500, + md_blue_grey_500 +) + diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/android/SampleChildren.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/SampleChildren.kt similarity index 94% rename from appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/android/SampleChildren.kt rename to appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/SampleChildren.kt index 5746830ff..60e9c7332 100644 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/android/SampleChildren.kt +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/SampleChildren.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.interactions.sample.android +package com.bumble.appyx.interactions.utils.ui import androidx.compose.foundation.layout.BoxScope import androidx.compose.runtime.Composable @@ -10,7 +10,6 @@ import com.bumble.appyx.interactions.core.AppyxInteractionsContainer import com.bumble.appyx.interactions.core.Element import com.bumble.appyx.interactions.core.model.BaseAppyxComponent import com.bumble.appyx.interactions.sample.SampleElement -import com.bumble.appyx.interactions.sample.colors import kotlin.math.roundToInt /** diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Color.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Color.kt similarity index 98% rename from appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Color.kt rename to appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Color.kt index b7ed48682..2f8e536c0 100644 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Color.kt +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Color.kt @@ -1,5 +1,5 @@ @file:Suppress("MagicNumber") -package com.bumble.appyx.interactions.theme +package com.bumble.appyx.interactions.utils.ui.theme import androidx.compose.ui.graphics.Color diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/MaterialColors.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/MaterialColors.kt similarity index 99% rename from appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/MaterialColors.kt rename to appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/MaterialColors.kt index 4d0a2c018..f28b0ff46 100644 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/MaterialColors.kt +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/MaterialColors.kt @@ -1,5 +1,5 @@ @file:Suppress("MagicNumber") -package com.bumble.appyx.interactions.theme +package com.bumble.appyx.interactions.utils.ui.theme import androidx.compose.ui.graphics.Color diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Shape.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Shape.kt similarity index 83% rename from appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Shape.kt rename to appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Shape.kt index 644c00e8e..6b276d067 100644 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Shape.kt +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Shape.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.interactions.theme +package com.bumble.appyx.interactions.utils.ui.theme import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Shapes diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Theme.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Theme.kt similarity index 98% rename from appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Theme.kt rename to appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Theme.kt index 2d635268c..c0b42718e 100644 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Theme.kt +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Theme.kt @@ -1,9 +1,9 @@ -package com.bumble.appyx.interactions.theme +package com.bumble.appyx.interactions.utils.ui.theme import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.lightColorScheme import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.lightColorScheme import androidx.compose.runtime.Composable diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Type.kt b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Type.kt similarity index 93% rename from appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Type.kt rename to appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Type.kt index b60b794c8..1cac6988e 100644 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/theme/Type.kt +++ b/appyx-interactions/android-utils/src/main/java/com/bumble/appyx/interactions/utils/ui/theme/Type.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.interactions.theme +package com.bumble.appyx.interactions.utils.ui.theme import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle diff --git a/appyx-interactions/android/build.gradle.kts b/appyx-interactions/android/build.gradle.kts index d7dc1919c..a26ce7247 100644 --- a/appyx-interactions/android/build.gradle.kts +++ b/appyx-interactions/android/build.gradle.kts @@ -9,14 +9,13 @@ appyx { dependencies { val composeBom = platform(libs.compose.bom) - api(libs.compose.material3) - api(project(":appyx-interactions:appyx-interactions")) - api(libs.compose.ui.test.junit4.android) - implementation(libs.androidx.test.core) implementation(composeBom) + implementation(libs.androidx.test.core) + implementation(libs.androidx.lifecycle.java8) - androidTestImplementation(composeBom) + implementation(project(":appyx-interactions:appyx-interactions")) + androidTestImplementation(libs.compose.ui.test.junit4.android) androidTestImplementation(libs.compose.ui.test.junit4) debugRuntimeOnly(libs.compose.ui.test.manifest) diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/Ext.kt b/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/Ext.kt deleted file mode 100644 index b6508a8ce..000000000 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/Ext.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.bumble.appyx.interactions.sample - -import com.bumble.appyx.interactions.theme.atomic_tangerine -import com.bumble.appyx.interactions.theme.manatee -import com.bumble.appyx.interactions.theme.md_amber_500 -import com.bumble.appyx.interactions.theme.md_blue_500 -import com.bumble.appyx.interactions.theme.md_blue_grey_500 -import com.bumble.appyx.interactions.theme.md_cyan_500 -import com.bumble.appyx.interactions.theme.md_grey_500 -import com.bumble.appyx.interactions.theme.md_indigo_500 -import com.bumble.appyx.interactions.theme.md_light_blue_500 -import com.bumble.appyx.interactions.theme.md_light_green_500 -import com.bumble.appyx.interactions.theme.md_lime_500 -import com.bumble.appyx.interactions.theme.md_pink_500 -import com.bumble.appyx.interactions.theme.md_teal_500 -import com.bumble.appyx.interactions.theme.silver_sand -import com.bumble.appyx.interactions.theme.sizzling_red - -val colors = listOf( - manatee, - sizzling_red, - atomic_tangerine, - silver_sand, - md_pink_500, - md_indigo_500, - md_blue_500, - md_light_blue_500, - md_cyan_500, - md_teal_500, - md_light_green_500, - md_lime_500, - md_amber_500, - md_grey_500, - md_blue_grey_500 -) - diff --git a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/InteractionTarget.kt b/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/InteractionTarget.kt deleted file mode 100644 index f5f9a2596..000000000 --- a/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/InteractionTarget.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.bumble.appyx.interactions.sample - -enum class InteractionTarget { - Child1, Child2, Child3, Child4, Child5, Child6, Child7, Child8, Child9, Child10 -} diff --git a/build.gradle.kts b/build.gradle.kts index 2703ef78c..ef6a5e530 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -69,6 +69,12 @@ dependencyAnalysis { exclude(":utils:testing-unit-common") } } + project(":appyx-interactions:android") { + onIncorrectConfiguration { + severity("fail") + exclude(":appyx-interactions:appyx-interactions") + } + } project(":utils:testing-junit5") { onUnusedDependencies { severity("fail") diff --git a/demos/appyx-interactions/android/build.gradle.kts b/demos/appyx-interactions/android/build.gradle.kts index d6244e7fd..95b4a8951 100644 --- a/demos/appyx-interactions/android/build.gradle.kts +++ b/demos/appyx-interactions/android/build.gradle.kts @@ -15,7 +15,7 @@ dependencies { val composeBom = platform(libs.compose.bom) implementation(composeBom) - implementation(project(":appyx-interactions:android")) + implementation(project(":appyx-interactions:android-utils")) implementation(project(":appyx-components:standard:spotlight:spotlight")) implementation(project(":appyx-components:experimental:cards:android")) implementation(project(":appyx-components:experimental:puzzle15:android")) diff --git a/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/MainActivity.kt b/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/MainActivity.kt index 34f5f0214..538ff954a 100644 --- a/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/MainActivity.kt +++ b/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/MainActivity.kt @@ -10,13 +10,13 @@ import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalLifecycleOwner import androidx.compose.ui.unit.ExperimentalUnitApi -import com.bumble.appyx.interactions.theme.AppyxTheme -import com.bumble.appyx.interactions.theme.appyx_dark +import com.bumble.appyx.interactions.bottomnav.MainNavItem +import com.bumble.appyx.interactions.utils.ui.theme.AppyxTheme +import com.bumble.appyx.interactions.utils.ui.theme.appyx_dark import com.bumble.appyx.navigation.integration.NodeActivity import com.bumble.appyx.navigation.integration.NodeHost import com.bumble.appyx.navigation.platform.AndroidLifecycle import com.bumble.appyx.utils.material3.AppyxMaterial3NavNode -import com.bumble.appyx.interactions.bottomnav.MainNavItem @ExperimentalMaterialApi @@ -42,7 +42,7 @@ class MainActivity : NodeActivity() { ) { AppyxMaterial3NavNode( nodeContext = it, - navTargets = MainNavItem.values().toList(), + navTargets = MainNavItem.entries, navTargetResolver = MainNavItem.resolver, initialActiveElement = MainNavItem.CARDS ) diff --git a/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/KnobControl.kt b/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/KnobControl.kt index 5cb4055bd..bf71f828b 100644 --- a/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/KnobControl.kt +++ b/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/KnobControl.kt @@ -27,7 +27,7 @@ import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.IntSize import androidx.compose.ui.unit.dp -import com.bumble.appyx.interactions.theme.appyx_yellow1 +import com.bumble.appyx.interactions.utils.ui.theme.appyx_yellow1 import com.bumble.appyx.utils.multiplatform.AppyxLogger import kotlin.math.roundToInt diff --git a/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/SpotlightExperiment.kt b/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/SpotlightExperiment.kt index 64140ad20..f543d91a3 100644 --- a/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/SpotlightExperiment.kt +++ b/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/SpotlightExperiment.kt @@ -26,10 +26,10 @@ import com.bumble.appyx.components.spotlight.operation.updateElements import com.bumble.appyx.components.spotlight.ui.slider.SpotlightSlider import com.bumble.appyx.interactions.core.ui.gesture.GestureSettleConfig import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup -import com.bumble.appyx.interactions.sample.android.Element -import com.bumble.appyx.interactions.sample.android.SampleAppyxContainer -import com.bumble.appyx.interactions.theme.appyx_dark -import com.bumble.appyx.interactions.sample.InteractionTarget as Target +import com.bumble.appyx.interactions.utils.testing.TestTarget +import com.bumble.appyx.interactions.utils.ui.Element +import com.bumble.appyx.interactions.utils.ui.SampleAppyxContainer +import com.bumble.appyx.interactions.utils.ui.theme.appyx_dark @Composable @Suppress("LongMethod", "MagicNumber") @@ -40,27 +40,27 @@ fun SpotlightExperiment( visualisationType: SpotlightVisualisationType = SpotlightVisualisationType.SLIDER_ROTATION, ) { val items = listOf( - Target.Child1, - Target.Child2, - Target.Child3, - Target.Child4, - Target.Child5, - Target.Child6, - Target.Child7, - Target.Child1, - Target.Child2, - Target.Child3, - Target.Child4, - Target.Child5, - Target.Child6, - Target.Child7, - Target.Child1, - Target.Child2, - Target.Child3, - Target.Child4, - Target.Child5, - Target.Child6, - Target.Child7, + TestTarget.Child1, + TestTarget.Child2, + TestTarget.Child3, + TestTarget.Child4, + TestTarget.Child5, + TestTarget.Child6, + TestTarget.Child7, + TestTarget.Child1, + TestTarget.Child2, + TestTarget.Child3, + TestTarget.Child4, + TestTarget.Child5, + TestTarget.Child6, + TestTarget.Child7, + TestTarget.Child1, + TestTarget.Child2, + TestTarget.Child3, + TestTarget.Child4, + TestTarget.Child5, + TestTarget.Child6, + TestTarget.Child7, ) val model = remember { SpotlightModel( diff --git a/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/SpotlightVisualisationType.kt b/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/SpotlightVisualisationType.kt index 9c0a4392b..70fd77f9a 100644 --- a/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/SpotlightVisualisationType.kt +++ b/demos/appyx-interactions/android/src/main/kotlin/com/bumble/appyx/interactions/sample/SpotlightVisualisationType.kt @@ -3,13 +3,14 @@ package com.bumble.appyx.interactions.sample import com.bumble.appyx.components.spotlight.SpotlightModel import com.bumble.appyx.components.spotlight.ui.sliderrotation.SpotlightSliderRotation import com.bumble.appyx.interactions.core.ui.context.UiContext +import com.bumble.appyx.interactions.utils.testing.TestTarget enum class SpotlightVisualisationType { SLIDER_ROTATION; fun toVisualisation( uiContext: UiContext, - state: SpotlightModel.State, + state: SpotlightModel.State, ) = when (this) { SLIDER_ROTATION -> SpotlightSliderRotation(uiContext, state) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ed1da2a99..f2c2c649b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ composePlugin = "1.5.11" composeBom = "2023.10.01" composeCompiler = "1.5.7" coroutines = "1.6.4" -dependencyAnalysis = "1.29.0" +dependencyAnalysis = "1.27.0" detekt = "1.21.0" junit5 = "5.8.2" jvmTarget = "11" diff --git a/settings.gradle.kts b/settings.gradle.kts index b626ac48c..2d0cc4898 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -40,6 +40,7 @@ include( ":appyx-components:experimental:puzzle15:web", ":appyx-interactions:android", ":appyx-interactions:common", + ":appyx-interactions:android-utils", ":appyx-navigation:android", ":appyx-navigation:common", ":benchmark:benchmark-app",