sam43 / GitHubUserFinderKMM

Kotlin Multiplatform Mobile sample project with Jetpack Compose and SwiftUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHubUserFinderKMM

GitHub Actions build status

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.

iOS Swift Android Kotlin GitHub

Android iOS

About the project

  • Shared ViewModels πŸš€
  • Shared resources (svg, strings) with moko-resources
  • MVVM + Reducer implementation = MVI
  • List and detail screens
  • Favourite user feature with SQLDelight
  • Simple paging functionality
  • Linter & formatter (detekt, swiftlint)
  • Common tests
  • Dark mode
  • Automated dependency update with Renovate
  • GitHub Actions config: GitHubUserFinderKMM.yml
  • GitHub API
  • Coverage report (kover)

Libraries

Check Dependencies.kt for more details

Code coverage

  • πŸ“‹ Kover - Kotlin code coverage tool GitHub Repo stars

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 = 90
                    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

IDEs

  • Android Studio Flamingo | 2022.2.1 | with KMM plugin
  • Xcode 14.3

About

Kotlin Multiplatform Mobile sample project with Jetpack Compose and SwiftUI


Languages

Language:Kotlin 84.3%Language:Swift 15.7%