diff --git a/.editorconfig b/.editorconfig index b0a62b0..5d7e8a5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,4 +13,8 @@ ktlint_standard_blank-line-between-when-conditions=disabled ktlint_standard_backing-property-naming=disabled ktlint_standard_kdoc=disabled ktlint_standard_condition-wrapping=disabled +ktlint_standard_expression-operand-wrapping=disabled +ktlint_standard_function-signature=disabled +ktlint_standard_spacing-between-declarations-with-comments=disabled +ktlint_standard_mixed-condition-operators=disabled ktlint_experimental=enabled \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 5beaa3b..c8c8bae 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + buildscript { dependencies { classpath(libs.plugin.android.cache.fix) @@ -55,4 +57,13 @@ subprojects { tasks.withType(Test::class.java).all { testLogging.exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL } + + tasks.withType().configureEach { + compilerOptions { + freeCompilerArgs.addAll( + "-Xconsistent-data-class-copy-visibility", + "-Xannotation-default-target=param-property", + ) + } + } } diff --git a/cropper/src/main/kotlin/com/canhub/cropper/CropImageIntentChooser.kt b/cropper/src/main/kotlin/com/canhub/cropper/CropImageIntentChooser.kt index c0ab296..0cd1b1e 100644 --- a/cropper/src/main/kotlin/com/canhub/cropper/CropImageIntentChooser.kt +++ b/cropper/src/main/kotlin/com/canhub/cropper/CropImageIntentChooser.kt @@ -185,7 +185,7 @@ internal class CropImageIntentChooser( * It is required in Android Marshmallow and above if "CAMERA" permission is requested in the * manifest.

* See [StackOverflow - * question](http://stackoverflow.com/questions/32789027/android-m-camera-intent-permission-bug). + * question](http://stackoverflow.com/questions/32789027/android-m-camera-intent-permission-bug). */ private fun isExplicitCameraPermissionRequired(context: Context): Boolean = SDK_INT >= Build.VERSION_CODES.M && hasCameraPermissionInManifest(context) && diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 49bba0a..d2ca9a2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,32 +3,32 @@ minSdk = "21" compileSdk = "34" targetSdk = "34" -androidgradleplugin = "8.5.2" -kotlin = "2.0.0" -kotlinxcoroutines = "1.8.1" -ktlint = "1.3.1" +androidgradleplugin = "8.13.1" +kotlin = "2.2.21" +kotlinxcoroutines = "1.10.2" +ktlint = "1.8.0" [libraries] -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.4" } -androidx-test-junit = { module = "androidx.test.ext:junit", version = "1.2.1" } +androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version = "1.9.3" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.7.1" } +androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.13.0" } +androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version = "1.4.1" } +androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", version = "1.8.9" } +androidx-test-junit = { module = "androidx.test.ext:junit", version = "1.3.0" } junit = { module = "junit:junit", version = "4.13.2" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxcoroutines" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxcoroutines" } leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version = "2.14" } -material = { module = "com.google.android.material:material", version = "1.12.0" } -mock = { module = "io.mockk:mockk", version = "1.13.12" } -plugin-android-cache-fix = { module = "org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin", version = "3.0.1" } +material = { module = "com.google.android.material:material", version = "1.13.0" } +mock = { module = "io.mockk:mockk", version = "1.14.6" } +plugin-android-cache-fix = { module = "org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin", version = "3.0.3" } plugin-androidgradleplugin = { module = "com.android.tools.build:gradle", version.ref = "androidgradleplugin" } plugin-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "1.9.20" } plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } -plugin-licensee = { module = "app.cash.licensee:licensee-gradle-plugin", version = "1.11.0" } -plugin-paparazzi = { module = "app.cash.paparazzi:paparazzi-gradle-plugin", version = "1.3.3" } -plugin-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", version = "0.29.0" } -robolectric = { module = "org.robolectric:robolectric", version = "4.12.1" } +plugin-licensee = { module = "app.cash.licensee:licensee-gradle-plugin", version = "1.14.1" } +plugin-paparazzi = { module = "app.cash.paparazzi:paparazzi-gradle-plugin", version = "1.3.5" } +plugin-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", version = "0.35.0" } +robolectric = { module = "org.robolectric:robolectric", version = "4.16" } timber = { module = "com.jakewharton.timber:timber", version = "5.0.1" } [plugins] diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c35211..f8e1ee3 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae5a00b..4eac4a8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME - +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index f5feea6..adff685 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -115,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -173,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -206,15 +203,14 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 9b42019..e509b2d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,10 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell