Skip to content

Convert feature-insurance-certificate to a Kotlin Multiplatform module - #3369

Closed
StylianosGakis wants to merge 2 commits into
refactor/common-email-validationfrom
refactor/kmp-feature-insurance-certificate
Closed

StylianosGakis wants to merge 2 commits into
refactor/common-email-validationfrom
refactor/kmp-feature-insurance-certificate

Conversation

@StylianosGakis

Copy link
Copy Markdown
Member
🤖 AI description

Turns feature-insurance-certificate into a Kotlin Multiplatform module (JVM and Android targets) with its keys, ViewModels, presenters, use cases and screens in commonMain. Part of making the whole app run on a second platform (desktop). Nothing changes on Android.

Stacked on #3368, which this PR targets, because the email presenter now calls the commonMain isValidEmail from there.

Two things you would not guess from the diff:

  • The overview screen's share callback is typed DownloadedFile instead of java.io.File. The entries file builds the File from the same absolute path and hands it to sharePDF as before.
  • That entries file is the one Kotlin file left in androidMain, because sharing needs LocalContext. A later change adds a share seam and moves it.

The first commit is pure renames, including the 24 unit tests moving to jvmTest unchanged. Review the second.

The module now builds for JVM and Android, with its keys, screens,
presenters, ViewModels and use cases in commonMain. Email validation
uses the commonMain isValidEmail, and the overview screen hands the
downloaded PDF out as a DownloadedFile.

InsuranceEvidenceEntries stays in androidMain because sharing the PDF
needs LocalContext and Context.sharePDF.
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