Skip to content

Commit

Permalink
Simplify Artifacts docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Oct 21, 2021
1 parent 8d4c3cc commit 2972ca0
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
@@ -4,35 +4,14 @@

Coil has 8 artifacts published to `mavenCentral()`:

* `io.coil-kt:coil`: The default artifact which depends on `io.coil-kt:coil-base` and includes the `Coil` singleton and the `ImageView` extension functions.
* `io.coil-kt:coil`: The default artifact which depends on `io.coil-kt:coil-base`, creates a singleton `ImageLoader`, and includes the `ImageView` extension functions.
* `io.coil-kt:coil-base`: A subset of `io.coil-kt:coil` which **does not** include the singleton `ImageLoader` and the `ImageView` extension functions.
* `io.coil-kt:coil-compose`: Includes support for [Jetpack Compose](https://developer.android.com/jetpack/compose).
* `io.coil-kt:coil-compose-base`: A subset of `io.coil-kt:coil-compose` which does not include functions that depend on the singleton `ImageLoader`.
* `io.coil-kt:coil-gif`: Includes two [decoders](../api/coil-base/coil.decode/-decoder) to support decoding GIFs. See [GIFs](gifs.md) for more details.
* `io.coil-kt:coil-svg`: Includes a [decoder](../api/coil-base/coil.decode/-decoder) to support decoding SVGs. See [SVGs](svgs.md) for more details.
* `io.coil-kt:coil-video`: Includes two [fetchers](../api/coil-base/coil.fetch/-fetcher) to support fetching and decoding frames from [any of Android's supported video formats](https://developer.android.com/guide/topics/media/media-formats#video-codecs). See [videos](videos.md) for more details.
* `io.coil-kt:coil-bom`: Includes a [bill of materials](https://docs.gradle.org/7.2/userguide/platforms.html#sub:bom_import). See [Bill of Materials](#bill-of-materials) for more details.

You should depend on `io.coil-kt:coil-base` and **not** `io.coil-kt:coil` if either of the following is true:

- You are writing a library that depends on Coil. This is to avoid opting your users into the singleton.
- You want to use dependency injection to inject your [ImageLoader](image_loaders.md) instance(s).

If you need [transformations](transformations.md) that aren't part of the base Coil artifact, check out the third-party `coil-transformations` library hosted [here](https://github.com/Commit451/coil-transformations).

### Bill of Materials
You can use the Bill of Material artifact to define version once, and then just define which dependencies you want.

```gradle
implementation("io.coil-kt:coil-bom:<version>")
implementation("io.coil-kt:coil")
implementation("io.coil-kt:coil-base")
implementation("io.coil-kt:coil-compose")
implementation("io.coil-kt:coil-compose-base")
implementation("io.coil-kt:coil-gif")
implementation("io.coil-kt:coil-svg")
implementation("io.coil-kt:coil-video")
```
* `io.coil-kt:coil-video`: Includes a [decoder](../api/coil-base/coil.decode/-decoder) to support decoding frames from [any of Android's supported video formats](https://developer.android.com/guide/topics/media/media-formats#video-codecs). See [videos](videos.md) for more details.
* `io.coil-kt:coil-bom`: Includes a [bill of materials](https://docs.gradle.org/7.2/userguide/platforms.html#sub:bom_import). Importing the `coil-bom` module allows you to depend on other Coil artifacts without specifying a version.

## Java 8

0 comments on commit 2972ca0

Please sign in to comment.