mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-11-01 05:43:11 +08:00 
			
		
		
		
	fix: support gradle namespace
This commit is contained in:
		| @@ -9,6 +9,19 @@ def isNewArchitectureEnabled() { | ||||
|     return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" | ||||
| } | ||||
|  | ||||
| def supportsNamespace() { | ||||
|   def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.') | ||||
|   def major = parsed[0].toInteger() | ||||
|   def minor = parsed[1].toInteger() | ||||
|  | ||||
|   // Namespace support was added in 7.3.0 | ||||
|   if (major == 7 && minor >= 3) { | ||||
|     return true | ||||
|   } | ||||
|  | ||||
|   return major >= 8 | ||||
| } | ||||
|  | ||||
| apply plugin: 'com.android.library' | ||||
| if (isNewArchitectureEnabled()) { | ||||
|     apply plugin: 'com.facebook.react' | ||||
| @@ -16,6 +29,16 @@ if (isNewArchitectureEnabled()) { | ||||
|  | ||||
|  | ||||
| android { | ||||
|  | ||||
|     if (supportsNamespace()) { | ||||
|         namespace "cn.reactnative.modules.update" | ||||
|  | ||||
|         sourceSets { | ||||
|             main { | ||||
|                 manifest.srcFile "src/main/AndroidManifestNew.xml" | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     compileSdkVersion safeExtGet('compileSdkVersion', 28) | ||||
|     buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3') | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 sunnylqm
					sunnylqm