Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaronoe/ComposeArcade
A Sudoku game for Android & Desktop written with Jetpack Compose Multiplatform
https://github.com/aaronoe/ComposeArcade
Last synced: about 2 months ago
JSON representation
A Sudoku game for Android & Desktop written with Jetpack Compose Multiplatform
- Host: GitHub
- URL: https://github.com/aaronoe/ComposeArcade
- Owner: aaronoe
- Created: 2021-06-15T05:21:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-06-24T22:49:00.000Z (over 3 years ago)
- Last Synced: 2024-08-01T22:37:47.950Z (5 months ago)
- Language: Kotlin
- Homepage:
- Size: 411 KB
- Stars: 53
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🚀 Compose Arcade
A sample Kotlin Multiplatform Compose Sudoku app for Android & Desktop.
Most code is shared between Android & Desktop using Kotlin Multiplatform and [Jetbrains Compose](https://github.com/JetBrains/compose-jb).![Alt text](screenshots/sudoku-demo.png?raw=true "Demo running on Android & Ubuntu")
### This example supports the following targets:
- `Android` (Compose)
- `JVM` (Compose - Win / Linux / MacOS)### Libraries used:
- [Jetpack Compose](https://github.com/JetBrains/compose-jb) - shared UI
- [Decompose](https://github.com/arkivanov/Decompose) - navigation and lifecycle
- [Mavericks](https://github.com/airbnb/mavericks) - state management using MVI. For this project I created a
minimalistic multi-platform ViewModel implementation using MavericksStateStore.
- [Sudoku Game Logic](https://github.com/a11n/sudoku) A Sudoku generator and solver, ported to Kotlin multi-platform.### There are multiple modules:
- `:common:sudoku` - displays a list of todo items and a text field
- `:common:utils` - some shared utilities, including the state management classes
- `:common:root` - UI entrypoint and navigation logic
- `:common:compose-ui` - platform specific UI implementations (expect/actual funs)
- `:android` - Android application
- `:desktop` - Desktop applicationThe root module is integrated into Android and Desktop apps.
### Features:
- 99% of the code is shared: data, business logic, presentation, navigation and UI
- View state is preserved when navigating between screens, Android configuration change, etc.
- Model-View-Intent (aka MVI) architectural pattern### Running desktop application
```
./gradlew :desktop:run
```### Building native desktop distribution
```
./gradlew :desktop:package
# outputs are written to desktop/build/compose/binaries
```### Running Android application
Open project in Intellij IDEA or Android Studio and run "android" configuration.