usuiat / Zoomable

Jetpack Compose library that enables contents zooming with pinch gesture.
https://usuiat.github.io/Zoomable/
Apache License 2.0
318 stars 15 forks source link

Support for KMP #176

Open phillipsk opened 4 months ago

phillipsk commented 4 months ago

Java/Android compose ui tooling library references are preventing the library from being a pure kotlin multiplatform library

usuiat commented 4 months ago

@phillipsk Thank you for creating an issue.

I am not familiar with KMP, so please let me know. I don't think the zoomable library depends on ui-tooling, since ui-tooling is only used in the app module. How should I deal with this?

amrfarid140 commented 3 months ago

It's mainly build system changes. Mostly going to be on the gradle build files and publishing. A good start is adding the kotlin multiplatform gradle plugin and moving all of the library code to commonMain.

You might hit an issue with @FloatRange annotations if they aren't a KMP module. I've successfully used your project in a Compose multiplatform project of mine. Can confirm it works in both iOS and Android.

romainbsl commented 3 months ago

@amrfarid140 You mean you forked it and change the build system, right? Otherwise, I don't see how it could work on iOS side.

amrfarid140 commented 3 months ago

Yes @romainbsl that's what I meant.

romainbsl commented 3 months ago

@usuiat I probably can help providing Compose Multiplatform support. I'll prepare a PR

usuiat commented 3 months ago

@romainbsl Thank you! I'm looking forward it.

szczepanski-k commented 1 month ago

Is there any progress in this subject?

usuiat commented 1 month ago

@szczepanski-k I have released v2.0.0-beta01 that supports iOS. https://github.com/usuiat/Zoomable/releases/tag/v2.0.0-beta01