diff --git a/android/build.gradle b/android/build.gradle index cce30d7..a4adc27 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -43,6 +43,10 @@ def DEFAULT_MIN_SDK_VERSION = 16 def DEFAULT_TARGET_SDK_VERSION = 28 android { + def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION + if (agpVersion.tokenize('.')[0].toInteger() >= 7) { + namespace = "com.mpiannucci.reactnativecontextmenu" + } compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) defaultConfig {