InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
9.09k stars 719 forks source link

Koin Annotations is not supported for Compose Multiplatform? #1979

Open ubarua123 opened 2 months ago

ubarua123 commented 2 months ago

Describe the bug

Could not resolve io.insert-koin:koin-ksp-compiler:1.4.0-RC4

No matching variant of io.insert-koin:koin-ksp-compiler:1.4.0-RC4 was found. The consumer was configured to find a
 library for use during 'kotlin-metadata', preferably optimized for non-jvm, 
as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64', attribute 'org.jetbrains.kotlin.platform.type' with value 'native' but:

To Reproduce Steps to reproduce the behavior:

Add ksp dependancies

koin-annotations = { module = "io.insert-koin:koin-annotations", version.ref = "koin-ksp" }
koin-ksp-compiler = {module = "io.insert-koin:koin-ksp-compiler", version.ref = "koin-ksp"}

koin-ksp = "1.4.0-RC4"

Tried with 1.3.1. Still the same.

Expected behavior Gradle build should succeed

Koin module and version:

muazkadan commented 2 months ago

I've used Koin Annotations in a Kotlin Multiplatform Project (Android & iOS) before and it worked great Check the repository here if you want: KMP News App

ubarua123 commented 2 months ago

This is not a simple Kmm project. It's Compose Multiplatform. The project structure is different.

muazkadan commented 1 month ago

Here's a Koin Annotations Sample in Compose Multiplatform supporting Android, iOS, Desktop and Wasm