Koject
DI Container library for Kotlin Multiplatform.
Install / Use
/learn @mori-atsushi/KojectREADME
Koject
Koject is a DI Container Library for Kolin Multiplatform using KSP.
fun main() {
Koject.start()
val controller = inject<Controller>()
}
@Singleton
@Provides
class Api
@Singleton
@Provides
fun provideDB(): DB {
return DB.create()
}
@Binds
@Singleton
@Provides
class RepositoryImpl(
private val api: Api,
private val db: DB,
): Repository
interface Repository
@Provides
class Controller(
private val repository: Repository
)
Features
- Support Kotlin Multiplatform
- Easy provide with annotations
- Check dependency graph at compile time
- Code generation with KSP
- Support multi-module project
Documents
Examples
Related libraries
Koject is inspired by the following libraries.
Related Skills
node-connect
334.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
334.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.2kCommit, push, and open a PR
