From 6f9586a1feb18598b1f0169416ca673d714c281b Mon Sep 17 00:00:00 2001
From: liushuyu <liushuyu011@gmail.com>
Date: Fri, 7 Oct 2022 08:39:12 -0600
Subject: [PATCH] android: upgrade SDK and NDK versions (#6152)

---
 src/android/app/build.gradle                  | 21 ++++++++++---------
 src/android/build.gradle                      |  2 +-
 .../gradle/wrapper/gradle-wrapper.properties  |  2 +-
 src/android/gradlew                           |  0
 4 files changed, 13 insertions(+), 12 deletions(-)
 mode change 100644 => 100755 src/android/gradlew

diff --git a/src/android/app/build.gradle b/src/android/app/build.gradle
index 2d5d56f6b..844167454 100644
--- a/src/android/app/build.gradle
+++ b/src/android/app/build.gradle
@@ -10,8 +10,8 @@ def buildType
 def abiFilter = "arm64-v8a" //, "x86"
 
 android {
-    compileSdkVersion 31
-    ndkVersion "23.1.7779620"
+    compileSdkVersion 32
+    ndkVersion "25.1.8937393"
 
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
@@ -116,15 +116,15 @@ android {
 }
 
 dependencies {
-    implementation 'androidx.appcompat:appcompat:1.1.0'
-    implementation 'androidx.exifinterface:exifinterface:1.2.0'
+    implementation 'androidx.appcompat:appcompat:1.5.1'
+    implementation 'androidx.exifinterface:exifinterface:1.3.4'
     implementation 'androidx.cardview:cardview:1.0.0'
-    implementation 'androidx.recyclerview:recyclerview:1.1.0'
+    implementation 'androidx.recyclerview:recyclerview:1.2.1'
     implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
     implementation 'androidx.lifecycle:lifecycle-viewmodel:2.5.1'
-    implementation 'androidx.fragment:fragment:1.5.1'
+    implementation 'androidx.fragment:fragment:1.5.3'
     implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
-    implementation 'com.google.android.material:material:1.1.0'
+    implementation 'com.google.android.material:material:1.6.1'
 
     // For loading huge screenshots from the disk.
     implementation 'com.squareup.picasso:picasso:2.71828'
@@ -133,10 +133,11 @@ dependencies {
     implementation 'io.reactivex:rxandroid:1.2.1'
     implementation 'com.nononsenseapps:filepicker:4.2.1'
     implementation 'org.ini4j:ini4j:0.5.4'
-    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
-    implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
-    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
+    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
+    implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
+    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
 
+    // Please don't upgrade the billing library as the newer version is not GPL-compatible
     implementation 'com.android.billingclient:billing:2.0.3'
 }
 
diff --git a/src/android/build.gradle b/src/android/build.gradle
index bc20364aa..7b39fcaff 100644
--- a/src/android/build.gradle
+++ b/src/android/build.gradle
@@ -7,7 +7,7 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:7.1.2'
+        classpath 'com.android.tools.build:gradle:7.2.0'
 
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
diff --git a/src/android/gradle/wrapper/gradle-wrapper.properties b/src/android/gradle/wrapper/gradle-wrapper.properties
index 168b2d4c6..bd08889e5 100644
--- a/src/android/gradle/wrapper/gradle-wrapper.properties
+++ b/src/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ 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.5.1-bin.zip
diff --git a/src/android/gradlew b/src/android/gradlew
old mode 100644
new mode 100755