From b9ab160a22df8c457f2ba42c3cb1cb51b66f2ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20de=20Souza?= Date: Mon, 29 Apr 2024 17:16:35 +0200 Subject: [PATCH] Remove Compose previews --- CHANGELOG.md | 1 + build.gradle.kts | 3 +-- gradle/libs.versions.toml | 2 -- src/main/kotlin/ui/ClockContent.kt | 19 ------------------- 4 files changed, 2 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4e7c2a..8f5ce0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Use "debug" signing config instead of creating a new one - Remove unnecessary lines from .gitignore +- Remove Compose previews ## [1.8.2](https://github.com/ldeso/blitz/releases/tag/v1.8.2) – 2024-04-19 diff --git a/build.gradle.kts b/build.gradle.kts index 162b266..0c99ecf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -57,8 +57,7 @@ dependencies { implementation(libs.androidx.compose.foundation) implementation(libs.androidx.lifecycle.runtime.compose) implementation(libs.androidx.lifecycle.viewmodel.compose) - implementation(libs.androidx.ui.tooling.preview) - debugImplementation(libs.androidx.ui.tooling) + testImplementation(kotlin("test")) testImplementation(libs.kotlinx.coroutines.test) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 922f4c9..757d69d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,8 +18,6 @@ androidx-compose-compiler = { group = "androidx.compose.compiler", name = "compi androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation" } androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "androidxLifecycle" } androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "androidxLifecycle" } -androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } -androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" } [plugins] diff --git a/src/main/kotlin/ui/ClockContent.kt b/src/main/kotlin/ui/ClockContent.kt index 93410f1..8a42c69 100644 --- a/src/main/kotlin/ui/ClockContent.kt +++ b/src/main/kotlin/ui/ClockContent.kt @@ -25,8 +25,6 @@ import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.tooling.preview.PreviewScreenSizes import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import net.leodesouza.blitz.ui.components.BasicTime @@ -131,23 +129,6 @@ fun ClockContent( } } -/** Preview the chess clock screen content in Android Studio. */ -@Preview -@PreviewScreenSizes -@Composable -private fun ClockContentPreview() { - ClockContent( - whiteTimeProvider = { 5.minutes + 3.seconds }, - blackTimeProvider = { 5.minutes + 3.seconds }, - clockStateProvider = { ClockState.FULL_RESET }, - playerStateProvider = { PlayerState.WHITE }, - leaningSideProvider = { LeaningSide.RIGHT }, - backEventActionProvider = { ClockBackAction.PAUSE }, - backEventProgressProvider = { 0F }, - backEventSwipeEdgeProvider = { BackEventCompat.EDGE_LEFT }, - ) -} - /** * Set the rotation, translation and opacity of a BasicTime element in a graphics layer scope. *