Skip to content

Commit

Permalink
fix(android): making rn >= 73 support also compatible with rn <= 66 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderEggers committed Jun 29, 2023
1 parent 7805b9e commit 0c053eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion android/build.gradle
Expand Up @@ -29,9 +29,14 @@ def getExtOrIntegerDefault(name) {
apply plugin: 'com.android.library'

android {
namespace = "com.reactnativecommunity.netinfo"
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')

def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
// Check AGP version for backward compatibility reasons
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
namespace = "com.reactnativecommunity.netinfo"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand Down

0 comments on commit 0c053eb

Please sign in to comment.