Skip to content

Commit a87885b

Browse files
authored
chore: bump library native Android deps & config (#1891)
## Description ~Won't merge it RN as recent versions of these libraries require sdk >= 33 while current RN setup (clean app) requires >= 31.~ While the statement above holds true new context emerged: since August 2023 all Android apps have to target sdk >= 33 ([link](https://developer.android.com/google/play/requirements/target-sdk)) Thus this should not be a problem. ## Changes * Bumped default Kotlin version to `1.8.22` in example apps * Bumped default Kotlin version to `1.8.0` in lib (this aligns it with RN 0.73 template) * Bumped default target & compile target to 34 (notice that this is the default value used by the library, this can be overriden by user in application build.gradle) * Bumped series of lib depenencies (Android ones) to decently recent versions. ## Test code and steps to reproduce Ci works ## Checklist - [x] Ensured that CI passes
1 parent f99b857 commit a87885b

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

Example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
compileSdkVersion = 33
88
targetSdkVersion = 33
99
ndkVersion = "23.1.7779620"
10-
kotlinVersion = "1.6.21"
10+
kotlinVersion = "1.8.22"
1111
}
1212
repositories {
1313
google()

FabricExample/android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ buildscript {
99

1010
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
1111
ndkVersion = "23.1.7779620"
12+
kotlinVersion = "1.8.22"
1213
}
1314
repositories {
1415
google()

FabricTestExample/android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ buildscript {
99

1010
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
1111
ndkVersion = "23.1.7779620"
12+
kotlinVersion = "1.8.22"
1213
}
1314
repositories {
1415
google()

TestsExample/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99

1010
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
1111
ndkVersion = "23.1.7779620"
12-
kotlinVersion = "1.6.21"
12+
kotlinVersion = "1.8.22"
1313
}
1414
repositories {
1515
google()

android/build.gradle

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import com.android.Version
2+
13
buildscript {
24
ext {
3-
rnsDefaultTargetSdkVersion = 31
4-
rnsDefaultCompileSdkVersion = 31
5+
rnsDefaultTargetSdkVersion = 34
6+
rnsDefaultCompileSdkVersion = 34
57
rnsDefaultMinSdkVersion = 21
6-
rnsDefaultKotlinVersion = '1.6.21'
8+
rnsDefaultKotlinVersion = '1.8.0'
79
}
810
ext.safeExtGet = {prop, fallback ->
911
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
@@ -15,7 +17,7 @@ buildscript {
1517
dependencies {
1618
classpath('com.android.tools.build:gradle:4.2.2')
1719
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', rnsDefaultKotlinVersion)}"
18-
classpath "com.diffplug.spotless:spotless-plugin-gradle:5.15.0"
20+
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.11.0"
1921
}
2022
}
2123

@@ -45,7 +47,7 @@ def reactNativeArchitectures() {
4547

4648
android {
4749
compileSdkVersion safeExtGet('compileSdkVersion', rnsDefaultCompileSdkVersion)
48-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
50+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION
4951
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
5052
namespace "com.swmansion.rnscreens"
5153
}
@@ -122,10 +124,10 @@ repositories {
122124

123125
dependencies {
124126
implementation 'com.facebook.react:react-native:+'
125-
implementation 'androidx.appcompat:appcompat:1.1.0'
126-
implementation 'androidx.fragment:fragment:1.2.1'
127-
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
128-
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
129-
implementation 'com.google.android.material:material:1.1.0'
130-
implementation "androidx.core:core-ktx:1.5.0"
127+
implementation 'androidx.appcompat:appcompat:1.6.1'
128+
implementation 'androidx.fragment:fragment-ktx:1.6.1'
129+
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
130+
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
131+
implementation 'com.google.android.material:material:1.9.0'
132+
implementation "androidx.core:core-ktx:1.10.1"
131133
}

android/spotless.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'com.diffplug.spotless'
44
spotless {
55
kotlin {
66
target 'src/**/*.kt'
7-
ktlint("0.40.0")
7+
ktlint("0.43.0")
88
trimTrailingWhitespace()
99
indentWithSpaces()
1010
endWithNewline()

0 commit comments

Comments
 (0)