Skip to content

Commit

Permalink
feat(android): add namespace to support upcoming react native 0.73 (#19)
Browse files Browse the repository at this point in the history
as per
react-native-community/discussions-and-proposals#671,
this addition is required to support upcoming react native version while
still maintaining backward compatibility
  • Loading branch information
wn-na authored Aug 11, 2023
2 parents 1048304 + 7ecbe5f commit 7133cc1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ def getExtOrIntegerDefault(name) {
android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')

//Get Android Gradle Plugin version
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
//Apply namespace only if Android Gradle Plugin version equal or greater than 7
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
namespace "com.captureprotection"
}

defaultConfig {
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
Expand Down

0 comments on commit 7133cc1

Please sign in to comment.