Repository navigation
Conversation
Android-only media, share and platform bindings go to androidMain; the rest to commonMain. Tests move to androidHostTest unchanged.
Compose Desktop needs the chat coordinator, so shared/chat now builds for jvm and android. The coordinator, delegates, stores and ChatModule are in commonMain. Media, share, the Android foreground and notification bindings stay in androidMain (new AndroidChatModule), since they use Uri, Bitmap, Intent and shared/blob. - DataStore stores take PreferencesFiles; file names and keys are unchanged. - detectUrls reads candidates through an expect findWebUrls: Patterns.WEB_URL on Android, a copy of that pattern on the JVM. The link_detection vectors run on both. - InviteLinkText parses URLs without android.net.Uri. - BlobSealer no longer names ChatMediaSealing; Android adds it back with sealing(). - ChatType/Fiat/Mint.analytics (analytics) and FIRST_PARTY_HOSTS (core) move to commonMain in the same packages.
Collaborator
Author
|
Closing: these commits shipped in #1923, which also moved media, share and blob sealing into commonMain. |
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.
Compose Desktop needs to run the chat coordinator, so
apps/flipcash/shared/chatnow builds for jvm and android (flipcash.kmp.app.library). Same module path, same packages; Android behaviour is unchanged.commonMain: coordinator, delegates, projection, stores, the
AppForeground/ChatNotificationsinterfaces with theirNoneobjects, andChatModule(a Dagger@Moduleusable from Hilt and the desktop graph, likeOpenCodeModule).androidMain:
media/*(Uri, Bitmap, LruCache,shared/blob),share/*(Intent), theChatMediaSending,LinkPreviewImages,AppForegroundandChatNotificationsbindings (newAndroidChatModule), and the Android implementations. These stay Android-only because they use platform types; the coordinator already accepts theNonevariants.Changes needed to get the rest into common code:
PreferencesFilesinstead ofContext.preferencesDataStore, with the same file names and keys.detectUrlsgets its candidates from anexpect findWebUrls:Patterns.WEB_URLon Android, a copy of that pattern on the JVM.link_detection.jsonruns against both (LinkDetectionVectorJvmTest,LinkDetectionVectorAndroidTest).InviteLinkTextparses URLs withoutandroid.net.Uri.BlobSealerexposes its seal function; Android turns it into aChatMediaSealingwithsealing().ChatType/Fiat/Mint.analytics(shared/analytics) andFIRST_PARTY_HOSTS(core) move to commonMain in the same packages.Tests: the 750 existing tests stay in
androidHostTest, none moved to common/jvm; two new vector tests were added (one jvm, one android).Stacked on #1925.