Skip to content

Commit 9abefc4

Browse files
authored
fix: do not apply namespace if it is not available in agp (#2448)
## Description `namespace` method is available since AGP 7.x. ## Test plan <!-- Describe how did you test this change here. -->
1 parent d58f581 commit 9abefc4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

android/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ repositories {
168168

169169
android {
170170
compileSdkVersion safeExtGet("compileSdkVersion", 28)
171-
namespace "com.swmansion.gesturehandler"
171+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
172+
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
173+
namespace "com.swmansion.gesturehandler"
174+
}
172175

173176
// Used to override the NDK path/version on internal CI or by allowing
174177
// users to customize the NDK path/version from their root project (e.g. for M1 support)

0 commit comments

Comments
 (0)