freeletics / FlowRedux

Kotlin Multiplatform Statemachine library with nice DSL based on Flow from Kotlin Coroutine's.
https://freeletics.github.io/FlowRedux/
Apache License 2.0
700 stars 27 forks source link

How to share a kmm library ? #731

Closed ChaabouniMed closed 1 month ago

ChaabouniMed commented 1 month ago

I've been struggling with this problem for a long time, and I would be thankful if you could help me.

Before using KMM, we were sharing Android module artifacts as .aar files between our Android projects and consuming them to reuse modules. However, .aar files are only available for the Android platform.

When we switched to a KMM project structure, I noticed that the output in the build/outputs folder of the KMM module that I want to use it in another KMM project is an .aar file only. When I copy/paste it into the new KMM project, I can't consume it in commonMain, only in androidMain.

What is the solution for this?

Many thanks.