Skip to content

KMP module - #834

Draft
hannesa2 wants to merge 2 commits into
masterfrom
KMPmodule
Draft

hannesa2 wants to merge 2 commits into
masterfrom
KMPmodule

Conversation

@hannesa2

Copy link
Copy Markdown
Collaborator

No description provided.

@hannesa2
hannesa2 marked this pull request as draft September 27, 2026 05:33
…tform-independent classes

* Created a new chartLibCore Kotlin Multiplatform module (com.android.kotlin.multiplatform.library + org.jetbrains.kotlin.multiplatform) targeting androidTarget, jvm("desktop"), and iosX64/iosArm64/iosSimulatorArm64.

* Extracted the 5 genuinely platform-independent classes into its commonMain (same package names, so no call-site changes needed elsewhere): ObjectPool, FSize, PointD, ColorTemplate, highlight.Range, highlight.RangeDouble.

* Fixed the only two real platform couplings found: replaced android.graphics.Color.rgb(...) in ColorTemplate with a common argb() helper, and dropped the JVM-only @synchronized annotations in ObjectPool (common code can't assume JVM's synchronized — the class is not thread-safety-critical against instrumentation tests as run today, but flagging this trade-off).

* Moved ObjectPoolTest into commonTest, converted its JUnit assertions to kotlin.test.

* Registered chartLibCore in settings.gradle.kts and made chartLib depend on it (api(project(":chartLibCore"))).

* Verified: chartLibCore builds/tests pass on Android, desktop-JVM, and all 3 iOS targets; chartLib:test, chartLibCompose:assembleDebug, and the full ./gradlew test all still pass unchanged.
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.

1 participant