Does kodein supports hierarchical structure?
# kodein
z
Does kodein supports hierarchical structure?
r
Hi there. Assuming that you are talking about Kodein-DI, what is your use case ? what do you mean by “hierarchical structure” ?
z
Hey @romainbsl 🙂 I meant this. I added to my project:
Copy code
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
and the module where I have specific code for
iosMain
sourceset is failing to get kodein dependencies. It works when I build it only for specific architecture like
iosX64()
or
iosArm64()
but always fails with
ios()
. I think it’s only about Kodein as I can access coroutines deps for example (but well this class is small so I might be wrong 💭). Also yes, I meant Kodein-DI
r
Ok, so it is relative to KMP. We had to disable
enableGranularSourceSetsMetadata
few month ago, I will reactivate it and let you know how it goes
👀 1
🙏 1
I did not forget about you but there is an issue with the granular source sets metadata https://youtrack.jetbrains.com/issue/KT-46257 and so far the workaround is failing on windows I need to find another solution
🤞 1
z
Hey @romainbsl! Any plans to work on this since the issue is fixed? 🙂
r
Kotlin 1.6.20 enabled hierarchical project structure by default, so those configuration are gone on Kodein-DI. There was no official release so far, but you can try it with maven repository
<https://s01.oss.sonatype.org/content/repositories/snapshots/>
and the version
8.0.0-ktor-2-SNAPSHOT
.
🙏 1
Note that for Kotlin 1.6.20, JetBrains recommend using Android Studio 2021.1.1 (Bumblebee) or later to get the best experience.