Skip to content

Commit 8b31a01

Browse files
authored
Update: Minor upgrade in AGP and other code improvements (#649)
1 parent 43af11c commit 8b31a01

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

cropper/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ android {
3737
}
3838

3939
testOptions {
40-
unitTests {
41-
isIncludeAndroidResources = true
42-
}
40+
unitTests.isIncludeAndroidResources = true
4341
}
4442
}
4543

cropper/src/main/kotlin/com/canhub/cropper/BitmapUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ internal object BitmapUtils {
218218
scale: Float,
219219
flipHorizontally: Boolean,
220220
flipVertically: Boolean,
221-
): Bitmap? {
221+
): Bitmap {
222222
// get the rectangle in original image that contains the required cropped area (larger for non-
223223
// rectangular crop)
224224
val rect = getRectFromPoints(

cropper/src/main/kotlin/com/canhub/cropper/CropImageView.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,10 +1815,10 @@ class CropImageView @JvmOverloads constructor(
18151815
isSaveBitmapToInstanceState = a.getBoolean(R.styleable.CropImageView_cropSaveBitmapToInstanceState, isSaveBitmapToInstanceState)
18161816

18171817
CropImageOptions(
1818-
scaleType = ScaleType.values()[a.getInt(R.styleable.CropImageView_cropScaleType, default.scaleType.ordinal)],
1819-
cropShape = CropShape.values()[a.getInt(R.styleable.CropImageView_cropShape, default.cropShape.ordinal)],
1820-
cornerShape = CropCornerShape.values()[a.getInt(R.styleable.CropImageView_cornerShape, default.cornerShape.ordinal)],
1821-
guidelines = Guidelines.values()[a.getInt(R.styleable.CropImageView_cropGuidelines, default.guidelines.ordinal)],
1818+
scaleType = ScaleType.entries[a.getInt(R.styleable.CropImageView_cropScaleType, default.scaleType.ordinal)],
1819+
cropShape = CropShape.entries[a.getInt(R.styleable.CropImageView_cropShape, default.cropShape.ordinal)],
1820+
cornerShape = CropCornerShape.entries[a.getInt(R.styleable.CropImageView_cornerShape, default.cornerShape.ordinal)],
1821+
guidelines = Guidelines.entries[a.getInt(R.styleable.CropImageView_cropGuidelines, default.guidelines.ordinal)],
18221822
aspectRatioX = a.getInteger(R.styleable.CropImageView_cropAspectRatioX, default.aspectRatioX),
18231823
aspectRatioY = a.getInteger(R.styleable.CropImageView_cropAspectRatioY, default.aspectRatioY),
18241824
autoZoomEnabled = a.getBoolean(R.styleable.CropImageView_cropAutoZoomEnabled, default.autoZoomEnabled),

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ minSdk = "21"
33
compileSdk = "34"
44
targetSdk = "34"
55

6-
androidgradleplugin = "8.5.1"
6+
androidgradleplugin = "8.5.2"
77
kotlin = "2.0.0"
88
kotlinxcoroutines = "1.8.1"
99
ktlint = "1.3.1"
1010

1111
[libraries]
12-
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version = "1.9.1" }
12+
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version = "1.9.2" }
1313
androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.7.0" }
1414
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.13.1" }
1515
androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version = "1.3.7" }
16-
androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", version = "1.8.2" }
16+
androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", version = "1.8.4" }
1717
androidx-test-junit = { module = "androidx.test.ext:junit", version = "1.2.1" }
1818
junit = { module = "junit:junit", version = "4.13.2" }
1919
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxcoroutines" }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME
7-
zipStorePath=wrapper/dists
7+

0 commit comments

Comments
 (0)