This repository host the code presented in this article: https://blog.p-y.wtf/diy-your-own-dependency-injection-library
You should be able to open this project with IntelliJ, then run the main()
function in CoffeeExample.kt
.
diy-lib
: the runtime library and annotationsdiy-processor
: the@Inject
and@Component
KSP processors.coffee
:CoffeeExample.kt
shows different ways of setting up DI. Beware, there's a thermosiphon in there.