From ffa8649a93c9794a9e32552f1b5bc0641d093df8 Mon Sep 17 00:00:00 2001 From: Kesha Antonov Date: Wed, 8 Nov 2023 05:35:46 +0300 Subject: [PATCH] android: use namespace based on gradle version --- android/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 892f3fe..9e1987e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -7,7 +7,9 @@ def safeExtGet(prop, fallback) { } android { - if (project.android.hasProperty("namespace")) { + def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION + // Check AGP version for backward compatibility reasons (for RN < 0.71) + if (agpVersion.tokenize('.')[0].toInteger() >= 7) { namespace "com.eko" }