From 4ad0f5233167351b124044d160ef5d73301af455 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 22:50:15 +0000 Subject: [PATCH] Fix serialization import and quieten CI build logs - Transport.kt used the reified Json.encodeToString extension without importing kotlinx.serialization.encodeToString, so it resolved to the two-argument member overload and failed to compile. - Opt in to ExperimentalMaterial3Api for the clickable game tile. - Drop --stacktrace from the CI build. A one-line Kotlin error was being buried under 150 lines of Gradle internals, which made the actual message hard to find in the log. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_015qjfMiPUDshdKEUa6vxqzN --- .github/workflows/ci.yml | 6 +++--- app/src/main/java/org/prolibertate/games/net/Transport.kt | 1 + app/src/main/java/org/prolibertate/games/ui/AppRoot.kt | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e3d235..2aa346c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,13 +38,13 @@ jobs: uses: android-actions/setup-android@v3 - name: Build debug APK - run: ./gradlew assembleDebug --no-daemon --stacktrace + run: ./gradlew assembleDebug --no-daemon - name: Run unit tests - run: ./gradlew testDebugUnitTest --no-daemon --stacktrace + run: ./gradlew testDebugUnitTest --no-daemon - name: Run Android lint - run: ./gradlew lintDebug --no-daemon --stacktrace + run: ./gradlew lintDebug --no-daemon - name: Upload debug APK uses: actions/upload-artifact@v4 diff --git a/app/src/main/java/org/prolibertate/games/net/Transport.kt b/app/src/main/java/org/prolibertate/games/net/Transport.kt index 8bf2523..6ba84d4 100644 --- a/app/src/main/java/org/prolibertate/games/net/Transport.kt +++ b/app/src/main/java/org/prolibertate/games/net/Transport.kt @@ -8,6 +8,7 @@ import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.isActive import kotlinx.coroutines.launch import kotlinx.coroutines.withContext +import kotlinx.serialization.encodeToString import java.io.BufferedReader import java.io.BufferedWriter import java.io.Closeable diff --git a/app/src/main/java/org/prolibertate/games/ui/AppRoot.kt b/app/src/main/java/org/prolibertate/games/ui/AppRoot.kt index 4abbe14..dc17eff 100644 --- a/app/src/main/java/org/prolibertate/games/ui/AppRoot.kt +++ b/app/src/main/java/org/prolibertate/games/ui/AppRoot.kt @@ -192,6 +192,7 @@ fun MainMenuScreen( } } +@OptIn(ExperimentalMaterial3Api::class) @Composable private fun GameTile(game: GameDescriptor, onClick: () -> Unit) { Card(