Repository navigation
Prepare shared modules for an iOS network graph (RND-2355) - #3415
Draft
StylianosGakis wants to merge 10 commits into
Draft
StylianosGakis wants to merge 10 commits into
StylianosGakis wants to merge 10 commits into
Conversation
(cherry picked from commit c4ed38e)
language-core no longer depends on core-resources, so the data layer's iOS classpath stops pulling in Compose resources. Both callers are Compose UI files, and no UI module both features share can depend on language-core without a cycle, so each keeps a private copy next to it. (cherry picked from commit d191569)
A module calling sharedWithIos() in its hedvig block gets its own checkCommonMainImports task, which fails on Compose UI, design system, compose resources, Coil, paging-compose and Navigation 3 UI imports in src/commonMain and on such dependencies declared for commonMain. The module's check depends on it, and sharing the root task's name means ./gradlew checkCommonMainImports runs both. For an opted module viewModels() puts metrox-viewmodel-compose in jvmAndAndroidMain, so sharedWithIos() must come first. No module opts in yet, so every build is unchanged. (cherry picked from commit 5819443)
…s in shared commonMain The shared guard now also flags androidx.compose.animation imports, the Jetpack androidx.compose ui, foundation, material, material3 and animation groups, org.jetbrains.compose.animation, navigationevent-compose and metrox-viewmodel-compose, and reads commonMainCompileOnly too. The lifecycle compose artifacts stay allowed: on iOS lifecycle-viewmodel-compose, lifecycle-runtime-compose and lifecycle-viewmodel-navigation3 depend on the Compose runtime, runtime-saveable, savedstate-compose and navigation3-runtime only, with no Compose UI. (cherry picked from commit 7354b69)
checkUmbrellaClasspath resolves the umbrella's iosArm64 and iosSimulatorArm64 compile klibraries and fails on any org.jetbrains.skiko module or compose components-resources artifact, so a shared module that starts depending on Compose UI is caught by check instead of by a 70 MB larger iOS framework. The commonMain import guard only covers modules that opt in with sharedWithIos(); this covers whatever the umbrella reaches. (cherry picked from commit c5bdc16)
AuthTokenStorage, LogoutUseCase and DemoManager become commonMain interfaces. Their DataStore and Android implementations live in jvmMain with their own bindings, so each platform binds its own and a missing binding is a compile error. AuthTokenStorage's implementation is DataStoreAuthTokenStorage. core-demo-mode's DataStore dependencies move to jvmMain; auth-core-public keeps them in commonMain because BankIdSandboxState needs them there. (cherry picked from commit 1ae4b75) (with the rename-only commit 3de5091 squashed in, since that move does not compile on its own)
On native, the Apollo chain no longer logs out on UNAUTHENTICATED and the Ktor client installs no Datadog plugin. Native requests add Hedvig-TimeZone and send the iOS app's User-Agent format. Android and the JVM keep the same interceptors, plugin, headers and user agent. The Datadog plugin actual and its dependencies now live in androidMain, so network-clients no longer needs the mobile source set group. (cherry picked from commit 7231436) (with the rename-only commit 023bdc2 squashed in, since that move does not compile on its own)
Apollo iOS 2.4.0 sends clientApplicationName as the apollographql-client-name header, and Ugglan sets it to "iOS:<bundleId>" (hGraphQL ApolloClient.swift). Native now sends the same value; Android and the JVM keep sending the package id. (cherry picked from commit 8ce0ded)
Android and the JVM keep the logout-on-unauthenticated interceptor ahead of logging; native builds the client with logging only, so the native graph needs no AuthTokenService or DemoManager for it. One internal builder in commonMain holds everything the platforms share, and the logsOutOnUnauthenticated flag it replaces is gone. (cherry picked from commit ad05420)
…ared-prerequisites addHedvigInterceptors now takes the platform interceptors from this branch and the logMemberData switch from the GraphQL logging fix below it, and buildHedvigApolloClient keeps member data out of production logs on every platform.
StylianosGakis
changed the base branch from
develop
to
feat/home-important-message-severity
November 19, 2026 20:04
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
First of the four iOS PRs in the stack, on top of #3412. Lets a native (iOS) graph bind its own implementations of shared auth and network types: the auth token storage, logout and demo manager bindings and the Apollo client provider move to per-platform source sets, and headers, user agent and the Datadog Ktor plugin get native actuals. Android and desktop bind the same classes with the same scopes. Also adds two build guards: the umbrella's iOS classpath may never reach Skiko, and an opt-in commonMain guard against Compose UI for modules shared with iOS (no module opts in yet). Two develop bugs matter more once the token and device id come from Swift, and are fixed lower in the stack: member requests send no device id (3403) and each request reads the token twice (3404).