Skip to content

Convert feature-terminate-insurance to a Kotlin Multiplatform module - #3370

Closed
StylianosGakis wants to merge 2 commits into
developfrom
refactor/kmp-feature-terminate-insurance
Closed

StylianosGakis wants to merge 2 commits into
developfrom
refactor/kmp-feature-terminate-insurance

Conversation

@StylianosGakis

Copy link
Copy Markdown
Member
🤖 AI description

Turns feature-terminate-insurance into a Kotlin Multiplatform module (JVM and Android targets). Every Kotlin file, including the entries and deep links, is now in commonMain. Part of making the whole app run on a second platform (desktop). Nothing changes on Android.

The first commit is 32 pure renames, including the 17 unit tests moving to jvmTest unchanged. The second commit is five files, review that one:

  • The date picker's locale parameter is typed CommonLocale, which is a typealias of java.util.Locale on JVM and Android, so the same object reaches the picker. Only a preview's locale differs.
  • Window size classes come from the JetBrains coordinate the design system already uses. Same package, same resolved artifact.
  • Three imports that were unused and JVM-only or Android-only are gone.
  • isReturnDefaultValues is dropped since no Android unit tests remain, and ui-tooling-preview is declared explicitly as other KMP features do.

The module now builds with the JVM and Android targets and all of its code,
including the entries function and deep link provider, compiles from commonMain.

java.util.Locale becomes CommonLocale from core-locale; the date picker preview
uses previewCommonLocale. Window size classes come from the JetBrains
material3-window-size-class artifact that design-system-hedvig already uses.
Unused imports of android.R.attr.text and kotlinx.datetime.toJavaLocalDate are
dropped. Unit tests run as jvmTest.
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