Skip to content

Commit

Permalink
Add new module to generate Bill of Materials (#947)
Browse files Browse the repository at this point in the history
* Add new module to generate Bill of Material

* Remove gitignore from module

* Update docs/getting_started.md with suggestion

Co-authored-by: Colin White <colin@colinwhite.me>

Co-authored-by: Colin White <colin@colinwhite.me>
  • Loading branch information
ghostbear and colinrtwhite authored Oct 15, 2021
1 parent 1a2af73 commit 8d4c3cc
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
21 changes: 21 additions & 0 deletions coil-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import coil.setupLibraryModule

plugins {
id("com.android.library")
id("kotlin-android")
id("com.vanniktech.maven.publish")
}

setupLibraryModule()

dependencies {
constraints {
api(project(":coil-singleton"))
api(project(":coil-base"))
api(project(":coil-compose-singleton"))
api(project(":coil-compose-base"))
api(project(":coil-gif"))
api(project(":coil-video"))
api(project(":coil-svg"))
}
}
1 change: 1 addition & 0 deletions coil-bom/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<manifest package="coil.bom"/>
17 changes: 16 additions & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Artifacts

Coil has 7 artifacts published to `mavenCentral()`:
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-base`: A subset of `io.coil-kt:coil` which **does not** include the singleton `ImageLoader` and the `ImageView` extension functions.
Expand All @@ -11,6 +11,7 @@ Coil has 7 artifacts published to `mavenCentral()`:
* `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:

Expand All @@ -19,6 +20,20 @@ You should depend on `io.coil-kt:coil-base` and **not** `io.coil-kt:coil` if eit

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")
```

## Java 8

Coil requires [Java 8 bytecode](https://developer.android.com/studio/write/java8-support). To enable this add the following to your Gradle build script:
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include(
"coil-gif",
"coil-svg",
"coil-video",
"coil-bom",
)

// Private modules
Expand Down

0 comments on commit 8d4c3cc

Please sign in to comment.