From c28afa92c9a544d00ef522631d0a42d0576d3d25 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Fri, 10 Nov 2023 07:50:50 -0500 Subject: [PATCH] fix(android): android gradle plugin 8 compatibility --- android/build.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index ef87bc1..de7990e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -30,6 +30,13 @@ if (isNewArchitectureEnabled()) { } android { + + def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION + // Check AGP version for backward compatibility w/react-native versions still on gradle plugin 6 + if (agpVersion.tokenize('.')[0].toInteger() >= 7) { + namespace = "com.BV.LinearGradient" + } + compileSdkVersion safeExtGet('compileSdkVersion', 31).toInteger() defaultConfig { minSdkVersion safeExtGet('minSdkVersion', 21)