Koject Save Abandoned

DI Container library for Kotlin Multiplatform.

Project README

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

Koject is inspired by the following libraries.

Open Source Agenda is not affiliated with "Koject" Project. README Source: mori-atsushi/koject
Stars
92
Open Issues
9
Last Commit
9 months ago
License

Open Source Agenda Badge

Open Source Agenda Rating