DanielMartinus / Konfetti

Celebrate more with this lightweight confetti particle system 🎊
ISC License
3.19k stars 301 forks source link

Support for Kotlin Multiplatform: Android/iOS/JS #323

Open mkpazon opened 10 months ago

creativedrewy commented 10 months ago

Curious, has anyone assessed the effort involved in this?

DanielMartinus commented 10 months ago

Multiplatform support should be possible. I already started an effort to support Desktop compose by moving out any Android references from the core module https://github.com/DanielMartinus/Konfetti/pull/321

I've successfully built a desktop compose app using the new core module and implementing a wrapper for KonfettiView and DrawShapes using that core module.

If you want to play with it, all you need to do is import the new core module that I made available as a beta: implementation("nl.dionsegijn:konfetti-core:2.1.0-beta01")

It's basically a copy of what's inside the xml or compose module here but then using the api's of that platform.

bmilovanovic commented 8 months ago

Any timeline on the support for Compose Multiplatform? Is there a way we could help?

nilsjr commented 5 months ago

Hey @DanielMartinus, I like your library a lot. Great idea! We used it already 3-4 years ago in some production apps. As now compose multiplatform is official supported by google, I started yesterday to migrate Konfetti to kmp. As you already wrote desktop was a fast one and I think ios & wasm should now be also possible.

Here is my fork: https://github.com/nilsjr/Konfetti/tree/feature/kmp

Maybe we can find some synergies with your approach.

Current state: Work in progress but tests & all samples are running :D

bmilovanovic commented 4 months ago

Hi @nilsjr, how can I use your library?

nilsjr commented 4 months ago

Hey @bmilovanovic, you can checkout my fork and build it locally with publishToMavenLocal. After that you can use it in your project by adding mavenLocal() to your repositories. There is no multiplatform artifact yet because these changes are not merged.

Still waiting for feedback

bmilovanovic commented 4 months ago

Hi @nilsjr, I have tried that but when I try to publish an error pops up: Cannot perform signing task ':konfetti:compose:signReleasePublication' because it has no configured signatory Do I need to modify the code somehow? Thanks in advance

bmilovanovic commented 4 months ago

@nilsjr Previous was error on the main branch. After I switched to feature/kmp, a new error appeared when running publishToMavenLocal: Cannot locate tasks that match ':konfetti:publishToMavenLocal' as task 'publishToMavenLocal' not found in project ':konfetti'.

nilsjr commented 4 months ago

@bmilovanovic Yeah I will take a look

MathiasDL commented 1 month ago

I was also not able to get your branch working in my project @nilsjr , had a similar issue as the one above.

It would be great to have Multiplatform support, but it looks like @DanielMartinus is not really active anymore on this repository