From 166189fc339073d94c17c0dc496b1b875ab9de30 Mon Sep 17 00:00:00 2001 From: amiagr Date: Sun, 29 Sep 2024 16:10:57 +0330 Subject: [PATCH] build: added namespace for AGP version 7+. This should fix compatibility issues with gradle 8. --- android/build.gradle | 4 ++++ 1 file changed, 4 insertions(+) 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 {