https://kotlinlang.org logo
Title
h

Hossein Amini

02/03/2023, 12:18 PM
Is there anyone who used Koin annotation in a real KMM project? I’m trying to use it but it does not resolve
org.koin.ksp.generated.module
even in the Koin sample project https://github.com/InsertKoinIO/hello-kmp
p

Pedro Alberto

02/03/2023, 12:29 PM
let me give it a try
what command did you try ?
h

Hossein Amini

02/03/2023, 12:57 PM
Thank you I just wanted to use the module extension on my module classes which are annotated by @Module anotation
p

Pedro Alberto

02/03/2023, 1:15 PM
for me it compiled
and was ok
h

Hossein Amini

02/03/2023, 1:19 PM
Can it be related to the Android studio version? Mine is Electric Eel | 2022.1.1
p

Pedro Alberto

02/03/2023, 1:29 PM
maybe
Android Studio Flamingo | 2022.2.1 Beta 1
try flamingo
and update the KMM plugin
h

Hossein Amini

02/03/2023, 1:35 PM
Ok I'll try it Thank you
m

Mantas Varnagiris

02/03/2023, 2:30 PM
For me even for non kmm project, module generation is very random. sometimes they are generated, then you build again and they are gone. Not sure how to make them work
Although I did a big refactor from dagger to koin, so there might be some failures somewhere, but I do not get any logs
h

Hossein Amini

02/04/2023, 8:42 AM
For me even after updating the Android Studio to Flamingo | 2022.2.1 Beta 1, not only in my own project but also in the Koin sample project it doesn’t resolve
org.koin.ksp.generated.module
I’m afraid if it works randomly as @Mantas Varnagiris mentioned and causes problems while developing our project so I decided not to use Koin Annotations for now
p

Pedro Alberto

02/04/2023, 4:16 PM
what jdk are you using @Hossein Amini?
h

Hossein Amini

02/04/2023, 5:58 PM
java version “19.0.2” 2023-01-17 I asked one of my colleagues to check it on her machine but she had the same issue as me
p

Pedro Alberto

02/04/2023, 7:27 PM
am using 11
can you try that just for curious
a

arnaud.giuliani

02/06/2023, 10:58 AM
h

Hossein Amini

02/06/2023, 2:56 PM
@Pedro Alberto ok I'll try it
@arnaud.giuliani I was looking at that branch
a

arnaud.giuliani

02/06/2023, 3:37 PM
oh ye 👍
KSP setup issue then?
h

Hossein Amini

02/06/2023, 4:44 PM
@arnaud.giuliani Yeah it doesn’t resolve
org.koin.ksp.generated.module
and the module extension I can run the project but by rebuilding the project it argues about
org.koin.ksp.generated.module
a

arnaud.giuliani

02/06/2023, 5:29 PM
with KSP you need to build yes
h

Hossein Amini

02/10/2023, 5:54 AM
@arnaud.giuliani You mean it is normal?
org.koin.ksp.generated.module
is always red even after building the project