diff --git a/coil-bom/build.gradle.kts b/coil-bom/build.gradle.kts new file mode 100644 index 0000000000..f24798f6d4 --- /dev/null +++ b/coil-bom/build.gradle.kts @@ -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")) + } +} diff --git a/coil-bom/src/main/AndroidManifest.xml b/coil-bom/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..360e4decc1 --- /dev/null +++ b/coil-bom/src/main/AndroidManifest.xml @@ -0,0 +1 @@ + diff --git a/docs/getting_started.md b/docs/getting_started.md index 1dd4e63dba..0439c33d8b 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -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. @@ -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: @@ -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:") +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: diff --git a/settings.gradle.kts b/settings.gradle.kts index cf5ff26c33..d9bcb9e133 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,6 +7,7 @@ include( "coil-gif", "coil-svg", "coil-video", + "coil-bom", ) // Private modules