Skip to content

Commit

Permalink
Gradle v8 support (#54)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
maniac-tech authored Jul 6, 2024
1 parent 6e58abc commit 7f35b99
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
20 changes: 10 additions & 10 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

buildscript {
repositories {
mavenCentral();
jcenter();
google();
mavenCentral()
jcenter()
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath 'com.android.tools.build:gradle:8.0.0'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 31
buildToolsVersion "23.0.1"

buildToolsVersion "33.0.0"
namespace "com.reactlibrary"
defaultConfig {
minSdkVersion 21
targetSdkVersion 31
compileSdk 33
minSdkVersion 33
targetSdkVersion 33
versionCode 1
versionName "1.0"
}
Expand All @@ -34,7 +34,7 @@ repositories {
}

dependencies {
implementation 'com.facebook.react:react-native:0.20.1'
implementation 'com.facebook.react:react-native:0.72.10'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
}

5 changes: 3 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Sun Jun 23 15:36:21 IST 2024
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
3 changes: 2 additions & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.reactlibrary">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="33" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
</manifest>
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function startReadSMS(callback) {
}

export const checkIfHasSMSPermission = async () => {
if (Platform.OS === "android" && Platform.Version < 23) {
if (Platform.OS === "android" && Platform.Version > 23) {
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@maniac-tech/react-native-expo-read-sms",
"version": "5.0.0",
"version": "5.1.1",
"description": "Library to read incoming SMS in Android for Expo (React Native)",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 7f35b99

Please sign in to comment.