Patch for https://github.com/kohesive/injekt to make singleton factory thread safe
Add jitpack.io
repository to your root build.gradle.kts
file:
dependencyResolutionManagement {
repositories {
...
maven(url = "https://www.jitpack.io")
}
}
Add library to dependencies
dependencies {
implementation("com.github.mihonapp:injekt:1.0.0")
}
Call patchInjekt()
at the start of your application. For example:
class App : Application() {
override fun onCreate() {
patchInjekt()
// Rest of the code below
}
}