Skip to content

Commit

Permalink
Fix/agp support android (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjdavidson authored Jul 22, 2024
1 parent ff01d76 commit 9df8b81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ def getExtOrDefault(name, fallback) {
}

android {
// Check AGP version for backward compatibility w/react-native versions still on gradle plugin 6
// it looks like this causes issues between 7 and 8, so for the time being
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
namespace = "kjd.reactnative.bluetooth"
}

compileSdkVersion getExtOrDefault('compileSdkVersion', 34)
buildToolsVersion getExtOrDefault('buildToolsVersion', "34.0.0")

Expand Down
5 changes: 2 additions & 3 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kjd.reactnative.bluetooth">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>


0 comments on commit 9df8b81

Please sign in to comment.