You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Nikolay Igotti 9354a554b4 iMove to 0.3.0-build135 and Kotlin 1.4.21. 4 years ago
..
android Update Decompose to 0.1.1, remove copy-pasted code (#102) 4 years ago
buildSrc iMove to 0.3.0-build135 and Kotlin 1.4.21. 4 years ago
common iMove to 0.3.0-build135 and Kotlin 1.4.21. 4 years ago
desktop Update Decompose to 0.1.1, remove copy-pasted code (#102) 4 years ago
gradle/wrapper Move to 0.2.0-build128 4 years ago
screenshots Added screenshots for examples. 4 years ago
.gitignore Unify .gitignore across all examples and templates 4 years ago
README.md Added screenshots for examples. 4 years ago
build.gradle.kts Rename app folder to todoapp 4 years ago
gradle.properties Enable parallel builds and caching 4 years ago
gradlew Rename app folder to todoapp 4 years ago
gradlew.bat Rename app folder to todoapp 4 years ago
settings.gradle.kts Merge 'list' and 'add' modules into 'main' 4 years ago

README.md

An example of Kotlin Multiplatform todo app with shared Jetpack Compose UI.

Supported targets: Android and JVM.

Libraries used:

  • Jetpack Compose - shared UI
  • Decompose - navigation and lifecycle
  • MVIKotlin - presentation and business logic
  • Reaktive - background processing and data transformation
  • SQLDelight - data storage

There are multiple common modules:

  • utils - just some useful helpers
  • database - SQLDelight database definition
  • main - displays a list of todo items and a text field
  • edit - accepts an item id and allows editing
  • root - navigates between main and edit screens

The root module is integrated into both 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.

Desktop