Skip to content

feat(KMP-4): make home/ui compile on Android and iOS#174

Open
js-jasinski wants to merge 4 commits into
matejdro:mainfrom
js-jasinski:feat/KMP-4-home-ui-compile
Open

feat(KMP-4): make home/ui compile on Android and iOS#174
js-jasinski wants to merge 4 commits into
matejdro:mainfrom
js-jasinski:feat/KMP-4-home-ui-compile

Conversation

@js-jasinski

@js-jasinski js-jasinski commented Jul 1, 2026

Copy link
Copy Markdown

The Problem

Home/ui only builds for Android. For the move to iOS, it needs to build as a Kotlin Multiplatform module, without changing how it works on Android.

Solution

  • Made home/ui a Kotlin Multiplatform module.
  • Moved all files into the Android source set, with no code changes.
  • Swapped the old Android-only plugins for their direct equivalents (Metro, KSP, serialization).
  • Kept the Accompanist permissions opt-in on Android only.
  • Removed the unused parcelize plugin.
  • Left the shared source set empty, so iOS builds but has no code yet.

Developer Notes

  • Nothing changes on Android — the only real edit is home/ui/build.gradle.kts.
  • iOS has no code yet; this just proves the module builds for iOS.

…ugin

Introduces a `library-kmp-module` convention plugin in buildSrc so modules can
target Android and iOS with Compose Multiplatform. Uses the AGP
`com.android.kotlin.multiplatform.library` plugin (avoids the
kotlin.android <-> kotlin.multiplatform conflict) and gates iOS targets to macOS.
Converts common-navigation to a Kotlin Multiplatform module via the
library-kmp-module convention.
Converts home/ui to a Kotlin Multiplatform module. All existing code moves to the
Android source set unchanged, and the shared source set is left empty, so iOS
compiles with nothing in it yet.

- switch home/ui to the multiplatform module convention
- move all sources and resources into androidMain, with no code changes
- apply the Metro, KSP and serialization plugins directly
- run showkase and the navigation compiler through kspAndroid
- keep the Accompanist permissions opt-in on the Android source set only
- drop the unused parcelize plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant