File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,17 @@ def getExtOrIntegerDefault(name) {
3333
3434android {
3535 compileSdkVersion getExtOrIntegerDefault(" compileSdkVersion" )
36- namespace " com.reactnativeimageresizer"
36+ def agpVersion = com.android.Version . ANDROID_GRADLE_PLUGIN_VERSION
37+ def agpMajorVersion = agpVersion. tokenize(' .' )[0 ]. toInteger()
38+ def agpMinorVersion = agpVersion. tokenize(' .' )[1 ]. toInteger()
39+ /**
40+ * Namespace should be declared here starting from AGP 8.x, Starting AGP 7.3 it is also supported.
41+ * For AGP < 7.3, namespace should be declared in AndroidManifest.
42+ * See: https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes#namespace-dsl
43+ */
44+ if (agpMajorVersion >= 7 && agpMinorVersion >= 3 ) {
45+ namespace " com.reactnativeimageresizer"
46+ }
3747
3848 defaultConfig {
3949 minSdkVersion getExtOrIntegerDefault(" minSdkVersion" )
Original file line number Diff line number Diff line change 1- <manifest xmlns : android =" http://schemas.android.com/apk/res/android" >
1+ <manifest xmlns : android =" http://schemas.android.com/apk/res/android" package = " com.reactnativeimageresizer " >
22
33</manifest >
You can’t perform that action at this time.
0 commit comments