Skip to content

Commit 7f35b99

Browse files
authored
Gradle v8 support (#54)
* feat: Min Android SDK Target changed to 33 * chore: Added namespace and updated compileSdkVersion * fix: Added minSdk version to AndroidManifest.xml * chore: Bump package version to 5.1.1
1 parent 6e58abc commit 7f35b99

File tree

6 files changed

+19
-17
lines changed

6 files changed

+19
-17
lines changed

android/build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
buildscript {
33
repositories {
4-
mavenCentral();
5-
jcenter();
6-
google();
4+
mavenCentral()
5+
jcenter()
6+
google()
77
}
88

99
dependencies {
10-
classpath 'com.android.tools.build:gradle:4.2.0'
10+
classpath 'com.android.tools.build:gradle:8.0.0'
1111
}
1212
}
1313

1414
apply plugin: 'com.android.library'
1515

1616
android {
17-
compileSdkVersion 31
18-
buildToolsVersion "23.0.1"
19-
17+
buildToolsVersion "33.0.0"
18+
namespace "com.reactlibrary"
2019
defaultConfig {
21-
minSdkVersion 21
22-
targetSdkVersion 31
20+
compileSdk 33
21+
minSdkVersion 33
22+
targetSdkVersion 33
2323
versionCode 1
2424
versionName "1.0"
2525
}
@@ -34,7 +34,7 @@ repositories {
3434
}
3535

3636
dependencies {
37-
implementation 'com.facebook.react:react-native:0.20.1'
37+
implementation 'com.facebook.react:react-native:0.72.10'
3838
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
3939
}
4040

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Sun Jun 23 15:36:21 IST 2024
12
distributionBase=GRADLE_USER_HOME
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
24
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
4-
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6+
zipStoreBase=GRADLE_USER_HOME

android/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.reactlibrary">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
<uses-sdk android:minSdkVersion="33" />
34
<uses-permission android:name="android.permission.READ_SMS" />
45
<uses-permission android:name="android.permission.RECEIVE_SMS" />
56
</manifest>

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function startReadSMS(callback) {
4040
}
4141

4242
export const checkIfHasSMSPermission = async () => {
43-
if (Platform.OS === "android" && Platform.Version < 23) {
43+
if (Platform.OS === "android" && Platform.Version > 23) {
4444
return true;
4545
}
4646

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@maniac-tech/react-native-expo-read-sms",
3-
"version": "5.0.0",
3+
"version": "5.1.1",
44
"description": "Library to read incoming SMS in Android for Expo (React Native)",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)