Kotlin DSL for build-time code-generated DI #500
AntonButov
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello colleagues,
Currently, we have a situation where Koin and Kodein can use DSL for their work. Unfortunately, Dagger and Kotlin Inject cannot. And we’ve already gotten used to this.
In my humble opinion, the path of code generation has good prospects for the future.
I have developed a framework for Dagger 2 that allows generating Dagger module files based on Kotlin DSL:
https://github.com/AntonButov/dagger-dsl
I’m using file parsing during compilation to achieve this. Since Dagger 2 cannot be KMP, perhaps my approach and research might be of interest to you.
Beta Was this translation helpful? Give feedback.
All reactions