Repository navigation
Convert forever-ui to a Kotlin Multiplatform module - #3367
Closed
StylianosGakis wants to merge 2 commits into
Closed
StylianosGakis wants to merge 2 commits into
StylianosGakis wants to merge 2 commits into
Conversation
Pure rename so history follows the files. The build file still points at src/main and is rewritten in the next commit.
The module now builds for JVM and Android with its code in commonMain. Sharing the referral link and copying the referral code go through two module-local expect functions. The Android actuals keep the existing Intent chooser and ClipboardManager code; the JVM actuals put the text on the system clipboard. The referral code is percent-encoded with uri-kmp's Uri.encode, a port of Android's codec, which a jvmTest pins against the values android.net.Uri.encode produces.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI description
Turns
forever-uiinto a Kotlin Multiplatform module (JVM and Android targets) with its screen, ViewModel and Apollo operations incommonMain. Part of making the whole app run on a second platform (desktop), and it unblocks convertingfeature-foreverandfeature-onboarding.Nothing changes on Android. The two things that needed Android, the share sheet and copying the referral code to the clipboard, sit behind two small module-local
expectfunctions whose Android side is the previous code moved, not rewritten.The one swap worth a look:
android.net.Uri.encodebecomescom.eygraber.uri.Uri.encode(already used elsewhere incommonMain). A new test pins the exact encodings so the referral share URL cannot drift.The first commit is 16 pure renames, review the second.