Simple dependency injection, based on KotlinSerialization
Go to file
2020-01-19 14:07:11 +06:00
gradle/wrapper updates 2019-11-22 10:11:31 +06:00
src fixes in tests 2019-11-28 11:32:28 +06:00
.gitignore init 2019-11-19 18:16:59 +06:00
build.gradle update publish scripts 2020-01-19 14:07:11 +06:00
CHANGELOG.md custom objects instead of dependencies 2019-11-28 11:30:48 +06:00
gradle.properties update publish scripts 2020-01-19 14:07:11 +06:00
gradlew init 2019-11-19 18:16:59 +06:00
gradlew.bat init 2019-11-19 18:16:59 +06:00
LICENSE Initial commit 2019-11-19 09:24:10 +00:00
maven.publish.gradle update publish scripts 2020-01-19 14:07:11 +06:00
mpp_publish_config.json update publish scripts 2020-01-19 14:07:11 +06:00
publish.gradle update publish scripts 2020-01-19 14:07:11 +06:00
README.md fill README 2019-11-27 22:25:19 +06:00
settings.gradle updates 2019-11-22 10:11:31 +06:00

SDI

It is simple (in comparison with other systems) DI, which aim to be compatible and predictable.

Availability platforms

  • JVM
  • JS
  • Native

Required environment

To use this library you will need two things:

  • Json serializer
  • Json config

Unfortunately, currently not supported other formats (due to issue in Kotlinx.serialization)

Rules

Full examples of usage you can find in tests. In two words, there are a few rules for constructing of config:

  • Config root is an Json Object
  • Config root names will be used as dependency names
  • In the config dependency names can be used everywhere
  • In places, where dependency will be injected, must be used @ContextualSerializer annotation or @Serializer(ContextSerializer::class)