Skip to content

Add mobile sync session wiring#3574

Merged
ahmedre merged 4 commits intoquran:mainfrom
AhmedNMahran:feature/wire-mobile-sync-dependency
Apr 7, 2026
Merged

Add mobile sync session wiring#3574
ahmedre merged 4 commits intoquran:mainfrom
AhmedNMahran:feature/wire-mobile-sync-dependency

Conversation

@AhmedNMahran
Copy link
Copy Markdown
Contributor

Summary

  • add the mobile-sync dependency through the version catalog
  • wire mobile-sync into common:bookmark
  • add a shared MobileSyncSession wrapper around SharedDependencyGraph

Notes

  • this PR only adds infrastructure wiring
  • no bookmark migration, auth UI, login flow, or sync triggering is included yet
  • follow-up PRs will build on top of this session wrapper

)
private val driverFactory = DriverFactory(context = applicationContext)

private val graph by lazy { SharedDependencyGraph.init(driverFactory, environment) }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to call the one that takes in the AuthEnvironment otherwise we always get the default which is always production because:

return if (BuildKonfig.IS_DEBUG) AuthEnvironment.PRELIVE else AuthEnvironment.PRODUCTION

and because we publish release artifacts as we should do.

val syncService: SyncService
get() = graph.syncService

private fun endpoint(context: Context): String {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now, instead of using the debuggable flag, let's use the package name - if it ends with .debug use prelive otherwise production - in the future we should probably put this behind an interface

@AhmedNMahran AhmedNMahran force-pushed the feature/wire-mobile-sync-dependency branch from 1b2a537 to fb85bdd Compare April 7, 2026 21:23
@AhmedNMahran
Copy link
Copy Markdown
Contributor Author

@ahmedre I've minimized the PR scope to just add the dependency. please check

@AhmedNMahran AhmedNMahran requested a review from ahmedre April 7, 2026 21:31
@ahmedre ahmedre enabled auto-merge April 7, 2026 21:39
auto-merge was automatically disabled April 7, 2026 21:59

Head branch was pushed to by a user without write access

android:requestLegacyExternalStorage="true"
android:enableOnBackInvokedCallback="true"
android:localeConfig="@xml/locales_config"
tools:replace="android:fullBackupContent,android:dataExtractionRules"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, why are we adding this? 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok - coming from https://github.com/kalinjul/kotlin-multiplatform-oidc/blob/bf9e0a16abdf35c2cfa4666e17372d4828f39488/oidc-appsupport/src/androidMain/AndroidManifest.xml#L17

can we open an issue for their repo and/or a pull request to change this and explain why?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

OLD: app-madani-debug.apk (signature: V1, V2)
NEW: app-madani-debug.apk (signature: V1, V2)

          │            compressed             │           uncompressed            
          ├───────────┬───────────┬───────────┼───────────┬───────────┬───────────
 APK      │ old       │ new       │ diff      │ old       │ new       │ diff      
──────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────
      dex │  20.3 MiB │  23.7 MiB │  +3.4 MiB │  51.3 MiB │  60.2 MiB │  +8.9 MiB 
     arsc │   2.1 MiB │   2.1 MiB │ +10.3 KiB │   2.1 MiB │   2.1 MiB │ +10.3 KiB 
 manifest │   5.7 KiB │   5.9 KiB │    +244 B │  26.6 KiB │  27.9 KiB │  +1.3 KiB 
      res │   1.8 MiB │   1.8 MiB │  +2.7 KiB │     2 MiB │     2 MiB │  +4.9 KiB 
   native │   102 KiB │ 181.4 KiB │ +79.4 KiB │  36.5 KiB │  58.9 KiB │ +22.4 KiB 
    asset │   1.8 MiB │   1.8 MiB │       0 B │   4.1 MiB │   4.1 MiB │       0 B 
    other │ 200.1 KiB │ 204.8 KiB │  +4.6 KiB │ 501.8 KiB │ 507.5 KiB │  +5.7 KiB 
──────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────
    total │  26.3 MiB │  29.7 MiB │  +3.5 MiB │  60.1 MiB │    69 MiB │    +9 MiB 

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

New Dependencies
androidx.browser:browser:1.9.0
androidx.security:security-crypto:1.1.0
androidx.security:security-crypto-ktx:1.1.0
app.cash.sqldelight:coroutines-extensions:2.2.1
co.touchlab:kermit:2.0.8
co.touchlab:kermit-android:2.0.8
co.touchlab:kermit-core:2.0.8
co.touchlab:kermit-core-android:2.0.8
com.google.code.gson:gson:2.8.9
com.google.crypto.tink:tink-android:1.8.0
com.quran:auth:0.0.5
com.quran:auth-android:0.0.5
com.quran:mobile-sync:0.0.5
com.quran:mobile-sync-android:0.0.5
com.quran:mutations-definitions:0.0.5
com.quran:mutations-definitions-jvm:0.0.5
com.quran:persistence:0.0.5
com.quran:persistence-android:0.0.5
com.quran:syncengine:0.0.5
com.quran:syncengine-jvm:0.0.5
com.rickclephas.kmp:kmp-nativecoroutines-annotations:1.0.1
com.rickclephas.kmp:kmp-nativecoroutines-annotations-jvm:1.0.1
com.rickclephas.kmp:kmp-nativecoroutines-core:1.0.1
com.rickclephas.kmp:kmp-nativecoroutines-core-jvm:1.0.1
com.russhwolf:multiplatform-settings:1.3.0
com.russhwolf:multiplatform-settings-android:1.3.0
com.russhwolf:multiplatform-settings-no-arg:1.3.0
com.russhwolf:multiplatform-settings-no-arg-android:1.3.0
io.github.kalinjul.kotlin.multiplatform:oidc-appsupport:0.16.4
io.github.kalinjul.kotlin.multiplatform:oidc-appsupport-android:0.16.4
io.github.kalinjul.kotlin.multiplatform:oidc-core:0.16.4
io.github.kalinjul.kotlin.multiplatform:oidc-core-jvm:0.16.4
io.github.kalinjul.kotlin.multiplatform:oidc-crypto:0.16.4
io.github.kalinjul.kotlin.multiplatform:oidc-crypto-jvm:0.16.4
io.github.kalinjul.kotlin.multiplatform:oidc-preferences:0.16.4
io.github.kalinjul.kotlin.multiplatform:oidc-preferences-android:0.16.4
io.github.kalinjul.kotlin.multiplatform:oidc-tokenstore:0.16.4
io.github.kalinjul.kotlin.multiplatform:oidc-tokenstore-android:0.16.4
io.ktor:ktor-client-content-negotiation:3.4.0
io.ktor:ktor-client-content-negotiation-jvm:3.4.0
io.ktor:ktor-client-core:3.4.0
io.ktor:ktor-client-core-jvm:3.4.0
io.ktor:ktor-client-logging:3.4.0
io.ktor:ktor-client-logging-jvm:3.4.0
io.ktor:ktor-client-okhttp:3.4.0
io.ktor:ktor-client-okhttp-jvm:3.4.0
io.ktor:ktor-events:3.4.0
io.ktor:ktor-events-jvm:3.4.0
io.ktor:ktor-http:3.4.0
io.ktor:ktor-http-cio:3.4.0
io.ktor:ktor-http-cio-jvm:3.4.0
io.ktor:ktor-http-jvm:3.4.0
io.ktor:ktor-io:3.4.0
io.ktor:ktor-io-jvm:3.4.0
io.ktor:ktor-network:3.4.0
io.ktor:ktor-network-jvm:3.4.0
io.ktor:ktor-serialization:3.4.0
io.ktor:ktor-serialization-jvm:3.4.0
io.ktor:ktor-serialization-kotlinx:3.4.0
io.ktor:ktor-serialization-kotlinx-json:3.4.0
io.ktor:ktor-serialization-kotlinx-json-jvm:3.4.0
io.ktor:ktor-serialization-kotlinx-jvm:3.4.0
io.ktor:ktor-sse:3.4.0
io.ktor:ktor-sse-jvm:3.4.0
io.ktor:ktor-utils:3.4.0
io.ktor:ktor-utils-jvm:3.4.0
io.ktor:ktor-websocket-serialization:3.4.0
io.ktor:ktor-websocket-serialization-jvm:3.4.0
io.ktor:ktor-websockets:3.4.0
io.ktor:ktor-websockets-jvm:3.4.0
org.jetbrains.kotlinx:kotlinx-coroutines-slf4j:1.10.2
org.jetbrains.kotlinx:kotlinx-datetime:0.7.1
org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.7.1
org.jetbrains.kotlinx:kotlinx-io-bytestring:0.8.2
org.jetbrains.kotlinx:kotlinx-io-bytestring-jvm:0.8.2
org.jetbrains.kotlinx:kotlinx-io-core:0.8.2
org.jetbrains.kotlinx:kotlinx-io-core-jvm:0.8.2
org.jetbrains.kotlinx:kotlinx-serialization-json-io:1.10.0
org.jetbrains.kotlinx:kotlinx-serialization-json-io-jvm:1.10.0
org.kotlincrypto.bitops:bits:0.3.0
org.kotlincrypto.bitops:bits-jvm:0.3.0
org.kotlincrypto.bitops:endian:0.3.0
org.kotlincrypto.bitops:endian-jvm:0.3.0
org.kotlincrypto.core:core:0.8.0
org.kotlincrypto.core:core-jvm:0.8.0
org.kotlincrypto.core:digest:0.8.0
org.kotlincrypto.core:digest-jvm:0.8.0
org.kotlincrypto.hash:sha2:0.8.0
org.kotlincrypto.hash:sha2-jvm:0.8.0
org.kotlincrypto:error:0.4.0
org.kotlincrypto:error-jvm:0.4.0
org.slf4j:slf4j-api:2.0.17

Upgraded Dependencies
androidx.lifecycle:lifecycle-common:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-common-java8:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-common-jvm:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-livedata:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-livedata-core:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-livedata-core-ktx:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-process:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-runtime:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-runtime-android:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-runtime-compose:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-runtime-compose-android:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-runtime-ktx:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-runtime-ktx-android:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-service:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-viewmodel:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-viewmodel-android:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-viewmodel-ktx:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.10.0, (changed from 2.9.4)
androidx.lifecycle:lifecycle-viewmodel-savedstate-android:2.10.0, (changed from 2.9.4)
androidx.savedstate:savedstate:1.4.0, (changed from 1.3.2)
androidx.savedstate:savedstate-android:1.4.0, (changed from 1.3.2)
androidx.savedstate:savedstate-compose:1.4.0, (changed from 1.3.2)
androidx.savedstate:savedstate-compose-android:1.4.0, (changed from 1.3.2)
androidx.savedstate:savedstate-ktx:1.4.0, (changed from 1.3.2)
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.10.0, (changed from 1.7.3)
org.jetbrains.kotlinx:kotlinx-serialization-core:1.10.0, (changed from 1.7.3)
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.10.0, (changed from 1.7.3)
org.jetbrains.kotlinx:kotlinx-serialization-json:1.10.0, (changed from 1.7.3)
org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.10.0, (changed from 1.7.3)

@ahmedre ahmedre added this pull request to the merge queue Apr 7, 2026
Merged via the queue into quran:main with commit 1872af3 Apr 7, 2026
2 checks passed
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.

2 participants