From 99f7e02445098128b29a04290b851588971b5392 Mon Sep 17 00:00:00 2001 From: skydoves Date: Sat, 12 Nov 2022 14:06:14 +0900 Subject: [PATCH] Update README and prepare for the next release --- README.md | 43 ++++++++++++++++--- .../skydoves/landscapist/Configuration.kt | 6 +-- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4bc2196d..5cfe443a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ repositories { Next, add the dependency below to your **module**'s `build.gradle` file: ```gradle dependencies { - implementation "com.github.skydoves:landscapist-glide:2.0.4-SNAPSHOT" + implementation "com.github.skydoves:landscapist-glide:2.1.1-SNAPSHOT" } ``` @@ -72,7 +72,7 @@ allprojects { Next, add the dependency below to your **module**'s `build.gradle` file: ```gradle dependencies { - implementation "com.github.skydoves:landscapist-glide:2.0.3" + implementation "com.github.skydoves:landscapist-glide:2.1.0" } ``` @@ -345,20 +345,19 @@ FrescoImage( ``` ### LocalFrescoImageRequest -You can pass the same instance of your `ImageRequest` down through the Composition in your composable hierarchy as following the example below: +You can pass the same instance of your `imageRequestBuilder` down through the Composition in your composable hierarchy as following the example below: ```kotlin // customize the ImageRequest as needed -val imageRequest = ImageRequestBuilder +val imageRequestBuilder = ImageRequestBuilder .newBuilderWithSource(uri) .setImageDecodeOptions(decodeOptions) .setLocalThumbnailPreviewsEnabled(true) .setLowestPermittedRequestLevel(RequestLevel.FULL_FETCH) .setProgressiveRenderingEnabled(false) .setResizeOptions(ResizeOptions(width, height)) - .build() -CompositionLocalProvider(LocalFrescoImageRequest provides imageRequest) { +CompositionLocalProvider(LocalFrescoImageRequest provides imageRequestBuilder) { // This will automatically use the value of current ImageRequest in the hierarchy. FrescoImage( imageUrl = ... @@ -415,6 +414,17 @@ GlideImage( ) ``` +### RequestSize + +You can set the request size of your image by giving `requestSize` property as seen in the below: + +```kotlin +GlideImage( + .. + imageOptions = ImageOptions(requestSize = IntSize(800, 600)), +) +``` + ## Listening image state changes You can listen the image state changes by giving `onImageStateChanged` parameter to your image composable functions like the below: @@ -783,6 +793,27 @@ GlideImage( // CoilImage, FrescoImage also can be used. ``` > **Note**: You can also use the Palette for **`CoilImage`** and **`FrescoImage`**. + ## BOM + + [![Maven Central](https://img.shields.io/maven-central/v/com.github.skydoves/landscapist.svg?label=Maven%20Central)](https://search.maven.org/search?q=landscapist)
+ + The landscapist Bill of Materials (BOM) lets you manage all of your landscapist library versions by specifying only the BOM’s version. + + ```groovy +dependencies { + // Import the landscapist BOM + implementation platform("com.github.skydoves:landscapist-bom:$version") + + // Import landscapist libraries + implementation "com.github.skydoves:landscapist-glide" // fresco or coil + implementation "com.github.skydoves:landscapist-placeholder" + implementation "com.github.skydoves:landscapist-palette" + implementation "com.github.skydoves:landscapist-transformation" +} + ``` + +[![Maven Central](https://img.shields.io/maven-central/v/com.github.skydoves/landscapist.svg?label=Maven%20Central)](https://search.maven.org/search?q=landscapist)
+ ## Who's using Landscapist? If your project uses Landscapist, please let me know by creating a new issue! 🤗 diff --git a/buildSrc/src/main/kotlin/com/github/skydoves/landscapist/Configuration.kt b/buildSrc/src/main/kotlin/com/github/skydoves/landscapist/Configuration.kt index 7b566ec3..08dd9970 100644 --- a/buildSrc/src/main/kotlin/com/github/skydoves/landscapist/Configuration.kt +++ b/buildSrc/src/main/kotlin/com/github/skydoves/landscapist/Configuration.kt @@ -21,10 +21,10 @@ object Configuration { const val targetSdk = 33 const val minSdk = 21 const val majorVersion = 2 - const val minorVersion = 0 - const val patchVersion = 3 + const val minorVersion = 1 + const val patchVersion = 0 const val versionName = "$majorVersion.$minorVersion.$patchVersion" - const val versionCode = 59 + const val versionCode = 60 const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT" const val artifactGroup = "com.github.skydoves" }