Skip to content

Commit

Permalink
Merge pull request #1760 from pedrofsn/issue/1758-add_doc_koin-bom
Browse files Browse the repository at this point in the history
Adding koin BOM doc
  • Loading branch information
arnaudgiuliani committed Feb 29, 2024
2 parents 625cff2 + 026fb5e commit 0dcf904
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/setup/koin.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,26 @@ fun Application.main() {
:::info
From now you can continue on Koin Tutorials to learn about using Koin: [Ktor App Tutorial](../quickstart/ktor)
:::


### **Koin BOM**
The Koin Bill of Materials (BOM) lets you manage all of your Koin library versions by specifying only the BOM’s version. The BOM itself has links to the stable versions of the different Koin libraries, in such a way that they work well together. When using the BOM in your app, you don't need to add any version to the Koin library dependencies themselves. When you update the BOM version, all the libraries that you're using are automatically updated to their new versions.

```groovy
dependencies {
// Declare koin-bom version
implementation platform("io.insert-koin:koin-bom:$koin_bom")
// Declare the koin dependencies that you need
implementation("io.insert-koin:koin-android")
implementation("io.insert-koin:koin-core-coroutines")
implementation("io.insert-koin:koin-androidx-workmanager")
// If you need specify some version it's just point to desired version
implementation("io.insert-koin:koin-androidx-navigation:1.2.3-alpha03")
// Works with test libraries too!
testImplementation("io.insert-koin:koin-test-junit4")
testImplementation("io.insert-koin:koin-android-test")
}
```

0 comments on commit 0dcf904

Please sign in to comment.