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.
 
 
 
 
Arkadii Ivanov 48b66451ee
TodoApp. Update libraries. (#210)
4 years ago
..
android Add iOS target and app for todoapp example (#166) 4 years ago
buildSrc TodoApp. Update libraries. (#210) 4 years ago
common TodoApp. Update libraries. (#210) 4 years ago
desktop Add iOS target and app for todoapp example (#166) 4 years ago
gradle/wrapper
ios Add iOS target and app for todoapp example (#166) 4 years ago
screenshots
.gitignore
README.md
build.gradle.kts TodoApp. Update libraries. (#210) 4 years ago
gradle.properties Add iOS target and app for todoapp example (#166) 4 years ago
gradlew
gradlew.bat
settings.gradle.kts Add iOS target and app for todoapp example (#166) 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