Skip to content

Commit

Permalink
chore: add warning for agp namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
matinzd committed Nov 14, 2023
1 parent e46cb1e commit b350101
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/core/android/build.gradle
Expand Up @@ -33,10 +33,12 @@ if (isNewArchitectureEnabled()) {
}

android {
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
// Check AGP version for backward compatibility reasons
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace = "com.airbnb.android.react.lottie"
} else {
// print
println "DEPRECATION WARNING: The `namespace` property is not available in your version of AGP. Please upgrade to AGP 4.2+."
}

compileSdk getExtOrDefault('compileSdkVersion', 31)
Expand Down

0 comments on commit b350101

Please sign in to comment.