Add Kotlin Multiplatform support and enhance caching integrations#1
Merged
Conversation
Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
…dyBytes support Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
…s for metadata handling Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
…ata handling Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
…d OkHttp integration Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
…integration Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
…event logging and controls Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
…nce logging Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
…stsApi Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
…y and updating response handling Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
…r consistency Signed-off-by: Jeffery Orazulike <chukwudumebiorazulike@gmail.com>
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.
Summary
Library — converted to Kotlin Multiplatform (Maven Central distribution):
retrostash-core,retrostash-annotations,retrostash-ktor→ android, jvm, ios{X64,Arm64,SimulatorArm64}, wasmJs.retrostash-okhttp→ android, jvm (OkHttp is JVM-only);AndroidRetrostashStore+RetrostashOkHttpAndroidfactory split intoandroidMain.retrostash-ktor(exports core + annotations) +Package.swiftfor SPM consumption.com.vanniktech.maven.publishto Sonatype Central Portal; JitPack removed.com.android.kotlin.multiplatform.library; required new hierarchy template + node/yarn/binaryen Ivy repos insettings.gradle.kts.Bug fixes (with regression tests):
InMemoryRetrostashStorethread-safety —kotlinx.coroutines.sync.Mutexguards mutations + concurrent test.@CacheQueryon 2xx viaresponse.call.save(); logger plumbing.invalidate(...)resolves placeholder templates against bindings (parity with OkHttp interceptor) — fixes mutation not invalidating cache.Playground app — Compose Multiplatform:
:app(legacy android.application) into:composeApp(KMP-library) +:androidApp(android.application). Avoids AGP 9 incompatibility with kotlin.multiplatform + android.application in same module.iosApp/Xcode project consumescomposeAppframework viaembedAndSignAppleFrameworkForXcodeGradle task.Other:
:retrostashlegacy module deleted (replaced by KMP modules).release.ymlrewritten — macos-latest runner, runs full KMP test suite, builds + zips XCFramework, computes SHA-256, patches Package.swift, publishes via vanniktech, attaches XCFramework to GitHub Release.update_readme_version.pyupdates per-module Maven Central coords (was JitPack-style single coord).CONTRIBUTING.md+development.mdrewritten for KMP/Maven Central/SPM workflow.-Xmx2g → -Xmx6g(iOS framework link OOM'd).Test plan
./gradlew :retrostash-core:jvmTest :retrostash-core:iosSimulatorArm64Testpasses./gradlew :retrostash-okhttp:jvmTestpasses./gradlew :retrostash-ktor:jvmTest :retrostash-ktor:iosSimulatorArm64Testpasses (incl. invalidate-with-bindings + 5xx-no-invalidate + persistence)./gradlew :retrostash-annotations:assemblepasses./gradlew :composeApp:assemble :androidApp:assembleDebug :composeApp:desktopMainClasses :composeApp:compileKotlinIosSimulatorArm64 :composeApp:compileKotlinWasmJsall succeed./gradlew :retrostash-ktor:assembleRetrostashReleaseXCFrameworkproducesretrostash-ktor/build/XCFrameworks/release/Retrostash.xcframework./gradlew publishToMavenLocalemits per-target artifacts under~/.m2/repository/dev/logickoder/retrostash-{core,annotations,ktor,okhttp}/:androidApp:installDebugruns on emulator; switch between Ktor / OkHttp / Retrofit tabs; query → mutate → re-query shows cache-hit then network refresh:composeApp:runlaunches desktop window; Ktor + OkHttp tabs work:composeApp:wasmJsBrowserDevelopmentRunopens browser; only Ktor tab availableiosApp/README.md, ⌘R in Xcode; only Ktor tab availableMAVEN_CENTRAL_USERNAME,MAVEN_CENTRAL_PASSWORD,SIGNING_KEY,SIGNING_KEY_ID,SIGNING_KEY_PASSWORD) before triggering release workflowMigration note for consumers
Coords change from
com.github.logickoder:retrostash:0.0.4(JitPack) todev.logickoder:retrostash-{core,annotations,ktor,okhttp}:<v>(Maven Central). Migration table in README.