From 6bba08c00b2b099cd9e8feff690b87797129e38b Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 15 Apr 2023 11:15:16 +0200 Subject: [PATCH] Ported: Bump the target SDK version to 33 (Android 13) - m4gr3d https://github.com/godotengine/godot/commit/2803c471e895d3752081dc0cfb79769dc590a2d4 --- platform/android/export/export_plugin.cpp | 2 +- platform/android/java/app/config.gradle | 8 ++++---- .../java/gradle/wrapper/gradle-wrapper.properties | 2 +- .../pandemonium/input/PandemoniumGestureHandler.kt | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 65c431106..67df4e84d 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -226,7 +226,7 @@ static const char *APK_ASSETS_DIRECTORY = "res://android/build/assets"; static const char *AAB_ASSETS_DIRECTORY = "res://android/build/assetPacks/installTime/src/main/assets"; static const int DEFAULT_MIN_SDK_VERSION = 19; // Should match the value in 'platform/android/java/app/config.gradle#minSdk' -static const int DEFAULT_TARGET_SDK_VERSION = 32; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk' +static const int DEFAULT_TARGET_SDK_VERSION = 33; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk' const String SDK_VERSION_RANGE = vformat("%s,%s,1", DEFAULT_MIN_SDK_VERSION, DEFAULT_TARGET_SDK_VERSION); #ifndef ANDROID_ENABLED diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle index e2c13b182..f3da3147b 100644 --- a/platform/android/java/app/config.gradle +++ b/platform/android/java/app/config.gradle @@ -1,9 +1,9 @@ ext.versions = [ - androidGradlePlugin: '7.2.1', - compileSdk : 32, + androidGradlePlugin: '7.3.0', + compileSdk : 33, minSdk : 19, // Also update 'platform/android/export/export_plugin.cpp#DEFAULT_MIN_SDK_VERSION' - targetSdk : 32, // Also update 'platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION' - buildTools : '32.0.0', + targetSdk : 33, // Also update 'platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION' + buildTools : '33.0.2', kotlinVersion : '1.7.0', fragmentVersion : '1.3.6', nexusPublishVersion: '1.1.0', diff --git a/platform/android/java/gradle/wrapper/gradle-wrapper.properties b/platform/android/java/gradle/wrapper/gradle-wrapper.properties index 41dfb8790..aa991fcea 100644 --- a/platform/android/java/gradle/wrapper/gradle-wrapper.properties +++ b/platform/android/java/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumGestureHandler.kt b/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumGestureHandler.kt index 059cc2037..25c106037 100644 --- a/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumGestureHandler.kt +++ b/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumGestureHandler.kt @@ -242,8 +242,8 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes return true } - override fun onScale(detector: ScaleGestureDetector?): Boolean { - if (detector == null || !panningAndScalingEnabled && !pointerCaptureInProgress) { + override fun onScale(detector: ScaleGestureDetector): Boolean { + if (!panningAndScalingEnabled || pointerCaptureInProgress) { return false } PandemoniumLib.magnify( @@ -254,15 +254,15 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes return true } - override fun onScaleBegin(detector: ScaleGestureDetector?): Boolean { - if (detector == null || !panningAndScalingEnabled && !pointerCaptureInProgress) { + override fun onScaleBegin(detector: ScaleGestureDetector): Boolean { + if (!panningAndScalingEnabled || pointerCaptureInProgress) { return false } scaleInProgress = true return true } - override fun onScaleEnd(detector: ScaleGestureDetector?) { + override fun onScaleEnd(detector: ScaleGestureDetector) { scaleInProgress = false } } \ No newline at end of file