From 12ec5c24bf3309b27c2286770514c760711e110d Mon Sep 17 00:00:00 2001 From: Takuya Matsuda Date: Wed, 18 Dec 2024 21:31:14 +0900 Subject: [PATCH] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 最新のAndroid Studio では repositories は `settings.gradle.kts` で設定するように変更されたようです - クロップを実装する時、グリッドの初期サイズは FullSize にするケースが多いと思うので、サンプルに加えました --- README.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d201c9a..e0c9eb8 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,15 @@ https://user-images.githubusercontent.com/9051623/231838736-8bff221e-8515-4dd4-8 # Installation -1. Add the JitPack repository to your root `build.gradle`. +1. Add the JitPack repository to `settings.gradle.kts`. ``` -allprojects { - repositories { +dependencyResolutionManagement { ... - maven { url 'https://jitpack.io' } - } + repositories { + ... + maven("https://jitpack.io") + } } ``` @@ -23,7 +24,7 @@ allprojects { ``` dependencies { - implementation 'com.github.moyuruaizawa:cropify:${cropifyVersion}' + implementation("com.github.moyuruaizawa:cropify:${cropifyVersion}") } ``` @@ -38,6 +39,9 @@ Cropify( bitmap = imageResource(R.drawable.bitmap), state = state, onImageCropped = {}, + option = CropifyOption( + frameSize = FullSize + ), ) ``` @@ -50,7 +54,10 @@ Cropify( uri = imageUri, state = state, onImageCropped = {}, - onFailedToLoadImage = {} + onFailedToLoadImage = {}, + option = CropifyOption( + frameSize = FullSize + ), ) ```