diff --git a/.idea/inspectionProfiles/ktlint.xml b/.idea/inspectionProfiles/ktlint.xml index 8d611c3747..2672eb10e8 100644 --- a/.idea/inspectionProfiles/ktlint.xml +++ b/.idea/inspectionProfiles/ktlint.xml @@ -1,34 +1,6 @@ - \ No newline at end of file diff --git a/media/audio-ui-model/.gitignore b/media/audio-ui-model/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/media/audio-ui-model/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/media/audio-ui/src/test/kotlin/com/google/android/horologist/audio/ui/RotaryVolumeControlsTest.kt b/media/audio-ui/src/test/kotlin/com/google/android/horologist/audio/ui/RotaryVolumeControlsTest.kt index 697e08ff87..a184a26404 100644 --- a/media/audio-ui/src/test/kotlin/com/google/android/horologist/audio/ui/RotaryVolumeControlsTest.kt +++ b/media/audio-ui/src/test/kotlin/com/google/android/horologist/audio/ui/RotaryVolumeControlsTest.kt @@ -139,7 +139,7 @@ class RotaryVolumeControlsTest { @Test fun highResRotary_with15Max_converts30Pixels_getsOneVolumeIncrease() { val actual = - com.google.android.horologist.audio.ui.convertPixelToVolume( + convertPixelToVolume( change = 30f, volumeUiStateProvider = { VolumeUiState(current = 2, max = 15) }, ) @@ -150,7 +150,7 @@ class RotaryVolumeControlsTest { @Test fun highResRotary_with15Max_convertsNegative30Pixels_getsOneVolumeDecrease() { val actual = - com.google.android.horologist.audio.ui.convertPixelToVolume( + convertPixelToVolume( change = -30f, volumeUiStateProvider = { VolumeUiState(current = 2, max = 15) }, ) @@ -161,7 +161,7 @@ class RotaryVolumeControlsTest { @Test fun highResRotary_increasesBeyondMax_getsMax() { val actual = - com.google.android.horologist.audio.ui.convertPixelToVolume( + convertPixelToVolume( change = 100f, volumeUiStateProvider = { VolumeUiState(current = 25, max = 25) }, ) @@ -172,7 +172,7 @@ class RotaryVolumeControlsTest { @Test fun highResRotary_decreasesBeyondMin_getsMin() { val actual = - com.google.android.horologist.audio.ui.convertPixelToVolume( + convertPixelToVolume( change = -100f, volumeUiStateProvider = { VolumeUiState(current = 0, max = 25, min = 0) }, ) @@ -183,7 +183,7 @@ class RotaryVolumeControlsTest { @Test fun highResRotary_converts48Pixels_withSmallMax_getsNewVolumeCorrectly() { val actual = - com.google.android.horologist.audio.ui.convertPixelToVolume( + convertPixelToVolume( change = 48f, volumeUiStateProvider = { VolumeUiState(current = 0, max = 5, min = 0) }, ) @@ -195,7 +195,7 @@ class RotaryVolumeControlsTest { fun highResRotary_converts23Pixels_withSmallMax_getsNoChange() { // 23/48 = 0.47916 which would round to 0 val actual = - com.google.android.horologist.audio.ui.convertPixelToVolume( + convertPixelToVolume( change = 23f, volumeUiStateProvider = { VolumeUiState(current = 0, max = 5, min = 0) }, ) @@ -221,7 +221,7 @@ class RotaryVolumeControlsTest { modifier = Modifier .rotaryScrollable( - behavior = com.google.android.horologist.audio.ui.volumeRotaryBehavior( + behavior = volumeRotaryBehavior( volumeUiStateProvider = { VolumeUiStateMapper.map(volumeState) }, onRotaryVolumeInput = { newVolume -> volumeRepository.setVolume( diff --git a/media/sample/build.gradle.kts b/media/sample/build.gradle.kts index bbfe2c305c..57b7278ffa 100644 --- a/media/sample/build.gradle.kts +++ b/media/sample/build.gradle.kts @@ -211,9 +211,9 @@ dependencies { implementation(libs.moshi.adapters) implementation(libs.moshi.kotlin) - implementation(project(":media:audio-ui-model")) - implementation(project(":media:ui-model")) - testImplementation(project(":media:audio-ui-model")) + implementation(projects.media.audioUiModel) + implementation(projects.media.uiModel) + testImplementation(projects.media.audioUiModel) ksp(libs.moshi.kotlin.codegen) implementation(libs.kotlinx.serialization.core) diff --git a/media/ui-model/.gitignore b/media/ui-model/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/media/ui-model/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/media/ui-model/consumer-rules.pro b/media/ui-model/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/media/ui-model/proguard-rules.pro b/media/ui-model/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/media/ui-model/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/media/ui/src/test/java/com/google/android/horologist/media/ui/screens/player/PlayerScreenTest.kt b/media/ui/src/test/java/com/google/android/horologist/media/ui/screens/player/PlayerScreenTest.kt index b45a7babfe..f0e67c0e61 100644 --- a/media/ui/src/test/java/com/google/android/horologist/media/ui/screens/player/PlayerScreenTest.kt +++ b/media/ui/src/test/java/com/google/android/horologist/media/ui/screens/player/PlayerScreenTest.kt @@ -410,9 +410,7 @@ class PlayerScreenTest { // given composeTestRule.setContent { PlayerScreen( - playerViewModel = PlayerViewModel( - FakePlayerRepository(), - ), + playerViewModel = PlayerViewModel(FakePlayerRepository()), controlButtons = { _, _ -> Text("Custom") }, volumeViewModel = volumeViewModel, ) @@ -433,9 +431,7 @@ class PlayerScreenTest { // given composeTestRule.setContent { PlayerScreen( - playerViewModel = PlayerViewModel( - FakePlayerRepository(), - ), + playerViewModel = PlayerViewModel(FakePlayerRepository()), buttons = { Text("Custom") }, volumeViewModel = volumeViewModel, ) @@ -450,9 +446,7 @@ class PlayerScreenTest { // given composeTestRule.setContent { PlayerScreen( - playerViewModel = PlayerViewModel( - FakePlayerRepository(), - ), + playerViewModel = PlayerViewModel(FakePlayerRepository()), background = { Text("Custom") }, volumeViewModel = volumeViewModel, )