From 75a8a0de765f27de6461e5fb8fc37a49e780abf5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 21 Sep 2022 12:36:35 +0200 Subject: [PATCH] updating kotlin, common, gradle and target SDK to 33 --- app/build.gradle | 6 +++--- .../camera/implementations/CameraXPreview.kt | 4 ++-- .../com/simplemobiletools/camera/views/CameraPreview.kt | 6 +++--- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2287a624..2a62ccce 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,12 +9,12 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion 31 + compileSdkVersion 33 defaultConfig { applicationId "com.simplemobiletools.camera" minSdkVersion 29 - targetSdkVersion 31 + targetSdkVersion 33 versionCode 77 versionName "5.3.1" setProperty("archivesBaseName", "camera") @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:7c48da6bef' + implementation 'com.github.SimpleMobileTools:Simple-Commons:e93092b380' implementation 'androidx.documentfile:documentfile:1.0.1' implementation "androidx.exifinterface:exifinterface:1.3.3" implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.0" diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreview.kt b/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreview.kt index 471dfb51..2a138e8b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreview.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreview.kt @@ -271,9 +271,9 @@ class CameraXPreview( private fun setupZoomAndFocus() { val scaleGesture = camera?.let { ScaleGestureDetector(activity, PinchToZoomOnScaleGestureListener(it.cameraInfo, it.cameraControl)) } val gestureDetector = GestureDetector(activity, object : SimpleOnGestureListener() { - override fun onDown(e: MotionEvent?): Boolean { + override fun onDown(event: MotionEvent): Boolean { listener.onTouchPreview() - return super.onDown(e) + return super.onDown(event) } override fun onSingleTapConfirmed(event: MotionEvent): Boolean { diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/views/CameraPreview.kt b/app/src/main/kotlin/com/simplemobiletools/camera/views/CameraPreview.kt index adf039ed..410519ac 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/views/CameraPreview.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/views/CameraPreview.kt @@ -117,9 +117,9 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview { mediaSoundHelper.loadSounds() val gestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() { - override fun onSingleTapConfirmed(e: MotionEvent?): Boolean { - if (e != null && mIsFocusSupported && mCaptureSession != null) { - focusArea(e.rawX, e.rawY, true) + override fun onSingleTapConfirmed(event: MotionEvent): Boolean { + if (mIsFocusSupported && mCaptureSession != null) { + focusArea(event.rawX, event.rawY, true) } return true } diff --git a/build.gradle b/build.gradle index a13b99ff..7f3aa0e9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.6.21' + ext.kotlin_version = '1.7.10' repositories { google() @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.1.3' + classpath 'com.android.tools.build:gradle:7.2.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d0bc3e4b..bd3eb7d2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Nov 07 19:34:59 CET 2020 +#Thu Nov 05 21:17:11 CET 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip