Kotlin Multiplatform Mobile sample project with Jetpack Compose and SwiftUI
Check this basic, simple KMM project with latest and greatest libraries. You can also easily learn and keep your knowledge up-to-date in both Jeptack Compose and SwiftUI.
Android | iOS |
---|---|
- Shared ViewModels 🚀
- MVVM + Reducer implementation = MVI
- List and detail screens
- Favourite user feature with SQLDelight
- Simple paging functionality
- Linter & formatter (detekt, swiftlint)
- Dark mode
- Error handling
- Common tests
- GitHub Actions config: GitHubUserFinderKMM-Android.yml + GitHubUserFinderKMM-iOS.yml
- GitHub API
- Coverage report (kover)
Check Dependencies.kt for more details
- 💥 KMP-NativeCoroutines - Native coroutines and flows
- 🌎 Ktor - Network
- 🔒 SQLDelight - LocalDB
- 💉 Koin - DI framework
- 📋 Kermit - Logger
- 🎨 Coil - Image loader
Android
- 🚦 Testing - Common unit tests in
shared
module with MockHttpClient - 🔍 Linter & formatter
- 📋 Kover - Kotlin code coverage tool
Use
./gradlew koverMergedVerify koverMergedReport
to verify and generate the coverage report with a custom rule:
kover {
verify {
rule {
isEnabled = true
name = "Minimum coverage verification error"
target =
kotlinx.kover.api.VerificationTarget.ALL
bound {
minValue = 80
maxValue = 100
counter =
kotlinx.kover.api.CounterType.LINE
valueType =
kotlinx.kover.api.VerificationValueType.COVERED_PERCENTAGE
}
}
}
}
After that we can use the Kotlinx Kover Report to add the coverage report to the PR as a comment
Total Project Coverage | 80.65% |
---|
Originally posted by @kaszabimre in apter-tech#17 (comment)
- Android Studio Dolphin | 2021.3.1 | with KMM plugin
- Xcode 14.0.1
This project is using a gradle-versions-plugin to manage dependency versions.
To check if dependencies are in need of updating:
./gradlew dependencyUpdates
- UI tests
- Fancy animations