From d8d524e788c962f34e576c120996999d6ea91295 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 13:55:23 +0200 Subject: [PATCH 01/17] Bump library target/compile sdk version to 34 This aligns library with RN 0.73 Please note that this is only default setting used when no target/compile sdk version is specified by the application. --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 056a698ede..1132b0aafa 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,7 +1,7 @@ buildscript { ext { - rnsDefaultTargetSdkVersion = 31 - rnsDefaultCompileSdkVersion = 31 + rnsDefaultTargetSdkVersion = 34 + rnsDefaultCompileSdkVersion = 34 rnsDefaultMinSdkVersion = 21 rnsDefaultKotlinVersion = '1.6.21' } From f90130b71d2619c5023d6c88b064a3bb91b632da Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 13:58:48 +0200 Subject: [PATCH 02/17] Bump library default Kotlin version to 1.8.0 This aligns the library with RN 0.73 Note that this option is only a default, fallback value. Usually the value is imposed by the application (rootProject) --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 1132b0aafa..109f5c74b9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -3,7 +3,7 @@ buildscript { rnsDefaultTargetSdkVersion = 34 rnsDefaultCompileSdkVersion = 34 rnsDefaultMinSdkVersion = 21 - rnsDefaultKotlinVersion = '1.6.21' + rnsDefaultKotlinVersion = '1.8.0' } ext.safeExtGet = {prop, fallback -> rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback From d682d45e57f3a3723f79b74a72c52271b3276472 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 14:00:37 +0200 Subject: [PATCH 03/17] Apply linter suggestions --- android/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 109f5c74b9..4711c91f02 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,3 +1,5 @@ +import com.android.Version + buildscript { ext { rnsDefaultTargetSdkVersion = 34 @@ -45,7 +47,7 @@ def reactNativeArchitectures() { android { compileSdkVersion safeExtGet('compileSdkVersion', rnsDefaultCompileSdkVersion) - def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION + def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION if (agpVersion.tokenize('.')[0].toInteger() >= 7) { namespace "com.swmansion.rnscreens" } From 1aaaa3147e6b6d1aafb1c99ab4a2c39fae767568 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 14:01:01 +0200 Subject: [PATCH 04/17] Bump spotless version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 4711c91f02..209ca1d02c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -17,7 +17,7 @@ buildscript { dependencies { classpath('com.android.tools.build:gradle:4.2.2') classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', rnsDefaultKotlinVersion)}" - classpath "com.diffplug.spotless:spotless-plugin-gradle:5.15.0" + classpath "com.diffplug.spotless:spotless-plugin-gradle:6.11.0" } } From d046ffc3f64b6e4d23f6d22486b82962fed325ec Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 14:01:50 +0200 Subject: [PATCH 05/17] Bump spotless ktlint version to recommended one --- android/spotless.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/spotless.gradle b/android/spotless.gradle index 7c9f86c0aa..b8bed0830d 100644 --- a/android/spotless.gradle +++ b/android/spotless.gradle @@ -4,7 +4,7 @@ apply plugin: 'com.diffplug.spotless' spotless { kotlin { target 'src/**/*.kt' - ktlint("0.40.0") + ktlint("0.43.0") trimTrailingWhitespace() indentWithSpaces() endWithNewline() From d319e043afd6a6d02e2d98b95c630be3899b471a Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 14:48:21 +0200 Subject: [PATCH 06/17] Bump Kotlin version in TestsExample --- TestsExample/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestsExample/android/build.gradle b/TestsExample/android/build.gradle index 88a3ddd91d..0928bcde30 100644 --- a/TestsExample/android/build.gradle +++ b/TestsExample/android/build.gradle @@ -9,7 +9,7 @@ buildscript { // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. ndkVersion = "23.1.7779620" - kotlinVersion = "1.6.21" + kotlinVersion = "1.8.22" } repositories { google() From b576d06e7baaf4cab8f1dd6a715ea9ceb14f2174 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 14:52:20 +0200 Subject: [PATCH 07/17] Bump Kotlin version in Example --- Example/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Example/android/build.gradle b/Example/android/build.gradle index b2847cb0d0..d8db26d635 100644 --- a/Example/android/build.gradle +++ b/Example/android/build.gradle @@ -7,7 +7,7 @@ buildscript { compileSdkVersion = 33 targetSdkVersion = 33 ndkVersion = "23.1.7779620" - kotlinVersion = "1.6.21" + kotlinVersion = "1.8.22" } repositories { google() From eaac2562c0b2b5ddc60f10d1ae7733530a448d70 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 14:52:39 +0200 Subject: [PATCH 08/17] Bump Kotlin version in FabricExample --- FabricExample/android/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/FabricExample/android/build.gradle b/FabricExample/android/build.gradle index 34ea718194..9f0d8bf281 100644 --- a/FabricExample/android/build.gradle +++ b/FabricExample/android/build.gradle @@ -9,6 +9,7 @@ buildscript { // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. ndkVersion = "23.1.7779620" + kotlinVersion = "1.8.22" } repositories { google() From 0a857f6941386e816c2e6f400400d64e99fce88a Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 14:52:58 +0200 Subject: [PATCH 09/17] Bump Kotlin version in FabricTestExample --- FabricTestExample/android/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/FabricTestExample/android/build.gradle b/FabricTestExample/android/build.gradle index 34ea718194..9f0d8bf281 100644 --- a/FabricTestExample/android/build.gradle +++ b/FabricTestExample/android/build.gradle @@ -9,6 +9,7 @@ buildscript { // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. ndkVersion = "23.1.7779620" + kotlinVersion = "1.8.22" } repositories { google() From ca084a9069daeba2d5515e666097d0ad3a2ae10a Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 16:02:55 +0200 Subject: [PATCH 10/17] Bump coordinatorlayout dependency to 1.2.0 --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 209ca1d02c..c4abeff3d7 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -126,7 +126,7 @@ dependencies { implementation 'com.facebook.react:react-native:+' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.fragment:fragment:1.2.1' - implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' + implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' implementation 'com.google.android.material:material:1.1.0' implementation "androidx.core:core-ktx:1.5.0" From c16d003db461d765a9f063027f2c13e7b4d5b37b Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 16:04:32 +0200 Subject: [PATCH 11/17] Update dependency on swiperefreshlayout to 1.1.0 --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index c4abeff3d7..cab3be0b70 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -127,7 +127,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.fragment:fragment:1.2.1' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' - implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' + implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.google.android.material:material:1.1.0' implementation "androidx.core:core-ktx:1.5.0" } From a0a1d27704d49afdf970cc4d682d5ce7d0160c6b Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 16:16:03 +0200 Subject: [PATCH 12/17] Bump androidx.core to latest --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index cab3be0b70..8519034c0c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -129,5 +129,5 @@ dependencies { implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.google.android.material:material:1.1.0' - implementation "androidx.core:core-ktx:1.5.0" + implementation "androidx.core:core-ktx:1.12.0" } From e0c180215e16488064bf005fb98d306a7a089acf Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 16:16:50 +0200 Subject: [PATCH 13/17] Bump com.google.android.material to latest --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 8519034c0c..48a04d12b0 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -128,6 +128,6 @@ dependencies { implementation 'androidx.fragment:fragment:1.2.1' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' - implementation 'com.google.android.material:material:1.1.0' + implementation 'com.google.android.material:material:1.9.0' implementation "androidx.core:core-ktx:1.12.0" } From 31a27d47abe9302b9e12cfa770c9e9933ded166f Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 16:17:11 +0200 Subject: [PATCH 14/17] Bump androidx.appcompat to latest --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 48a04d12b0..82f6264a3d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -124,7 +124,7 @@ repositories { dependencies { implementation 'com.facebook.react:react-native:+' - implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.fragment:fragment:1.2.1' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' From 9325cc289c4d522b0d8bb58d013da73b44d221b7 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 16:17:31 +0200 Subject: [PATCH 15/17] Bump androidx.fragment to latest --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 82f6264a3d..dbf6af0a7b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -125,7 +125,7 @@ repositories { dependencies { implementation 'com.facebook.react:react-native:+' implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.fragment:fragment:1.2.1' + implementation 'androidx.fragment:fragment:1.6.1' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.google.android.material:material:1.9.0' From d4619aa9fd9f0f315b413c2182661d1aa4562f70 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 16:19:57 +0200 Subject: [PATCH 16/17] Use fragment-ktx instead of pure fragment dependency --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index dbf6af0a7b..0755ff2553 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -125,7 +125,7 @@ repositories { dependencies { implementation 'com.facebook.react:react-native:+' implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.fragment:fragment:1.6.1' + implementation 'androidx.fragment:fragment-ktx:1.6.1' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.google.android.material:material:1.9.0' From 65ee43ad6b31554adef3763ac6a568f619357739 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Thu, 14 Sep 2023 17:08:44 +0200 Subject: [PATCH 17/17] Downgrade androidx.core to 1.10.1 as 1.12.0 requires sdk >= 34 --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 0755ff2553..3e2d6f8cf2 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -129,5 +129,5 @@ dependencies { implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.google.android.material:material:1.9.0' - implementation "androidx.core:core-ktx:1.12.0" + implementation "androidx.core:core-ktx:1.10.1" }