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) {
33
33
34
34
android {
35
35
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
+ }
37
47
38
48
defaultConfig {
39
49
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 " >
2
2
3
3
</manifest >
You can’t perform that action at this time.
0 commit comments