Skip to content

Commit

Permalink
Update: Minor upgrade in AGP and other code improvements (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaypatelbond authored Oct 9, 2024
1 parent 43af11c commit 8b31a01
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 1 addition & 3 deletions cropper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ android {
}

testOptions {
unitTests {
isIncludeAndroidResources = true
}
unitTests.isIncludeAndroidResources = true
}
}

Expand Down
2 changes: 1 addition & 1 deletion cropper/src/main/kotlin/com/canhub/cropper/BitmapUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ internal object BitmapUtils {
scale: Float,
flipHorizontally: Boolean,
flipVertically: Boolean,
): Bitmap? {
): Bitmap {
// get the rectangle in original image that contains the required cropped area (larger for non-
// rectangular crop)
val rect = getRectFromPoints(
Expand Down
8 changes: 4 additions & 4 deletions cropper/src/main/kotlin/com/canhub/cropper/CropImageView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1815,10 +1815,10 @@ class CropImageView @JvmOverloads constructor(
isSaveBitmapToInstanceState = a.getBoolean(R.styleable.CropImageView_cropSaveBitmapToInstanceState, isSaveBitmapToInstanceState)

CropImageOptions(
scaleType = ScaleType.values()[a.getInt(R.styleable.CropImageView_cropScaleType, default.scaleType.ordinal)],
cropShape = CropShape.values()[a.getInt(R.styleable.CropImageView_cropShape, default.cropShape.ordinal)],
cornerShape = CropCornerShape.values()[a.getInt(R.styleable.CropImageView_cornerShape, default.cornerShape.ordinal)],
guidelines = Guidelines.values()[a.getInt(R.styleable.CropImageView_cropGuidelines, default.guidelines.ordinal)],
scaleType = ScaleType.entries[a.getInt(R.styleable.CropImageView_cropScaleType, default.scaleType.ordinal)],
cropShape = CropShape.entries[a.getInt(R.styleable.CropImageView_cropShape, default.cropShape.ordinal)],
cornerShape = CropCornerShape.entries[a.getInt(R.styleable.CropImageView_cornerShape, default.cornerShape.ordinal)],
guidelines = Guidelines.entries[a.getInt(R.styleable.CropImageView_cropGuidelines, default.guidelines.ordinal)],
aspectRatioX = a.getInteger(R.styleable.CropImageView_cropAspectRatioX, default.aspectRatioX),
aspectRatioY = a.getInteger(R.styleable.CropImageView_cropAspectRatioY, default.aspectRatioY),
autoZoomEnabled = a.getBoolean(R.styleable.CropImageView_cropAutoZoomEnabled, default.autoZoomEnabled),
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ minSdk = "21"
compileSdk = "34"
targetSdk = "34"

androidgradleplugin = "8.5.1"
androidgradleplugin = "8.5.2"
kotlin = "2.0.0"
kotlinxcoroutines = "1.8.1"
ktlint = "1.3.1"

[libraries]
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version = "1.9.1" }
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version = "1.9.2" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.7.0" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.13.1" }
androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version = "1.3.7" }
androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", version = "1.8.2" }
androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", version = "1.8.4" }
androidx-test-junit = { module = "androidx.test.ext:junit", version = "1.2.1" }
junit = { module = "junit:junit", version = "4.13.2" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxcoroutines" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 8b31a01

Please sign in to comment.