@norcy/react-native-toolkit 0.1.153 → 0.1.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/dependencies.gradle +44 -14
- package/package.json +1 -1
@@ -1,26 +1,18 @@
|
|
1
|
-
|
2
|
-
* Norcy Toolkit - Common Android Build Configuration
|
3
|
-
* 提供通用的 Android 构建配置和依赖管理函数
|
4
|
-
*/
|
5
|
-
|
6
|
-
ext.applyNorcyDefaultConfig = { targetProject, options = [:] ->
|
7
|
-
def enableSeparateBuildPerCPUArchitecture = options.enableSeparateBuildPerCPUArchitecture ?: false
|
8
|
-
def abiFiltersList = options.abiFilters ?: ["armeabi-v7a", "arm64-v8a"]
|
9
|
-
|
1
|
+
ext.applyDefaultConfig = { targetProject ->
|
10
2
|
targetProject.android {
|
11
3
|
defaultConfig {
|
12
4
|
multiDexEnabled true
|
13
5
|
ndk {
|
14
|
-
abiFilters
|
6
|
+
abiFilters "armeabi-v7a", "arm64-v8a"
|
15
7
|
}
|
16
8
|
}
|
17
9
|
|
18
10
|
splits {
|
19
11
|
abi {
|
20
12
|
reset()
|
21
|
-
enable
|
13
|
+
enable false
|
22
14
|
universalApk true
|
23
|
-
include
|
15
|
+
include "armeabi-v7a", "arm64-v8a"
|
24
16
|
}
|
25
17
|
}
|
26
18
|
|
@@ -35,7 +27,10 @@ ext.applyNorcyDefaultConfig = { targetProject, options = [:] ->
|
|
35
27
|
}
|
36
28
|
}
|
37
29
|
|
38
|
-
ext.
|
30
|
+
ext.applyCommonDependencies = { targetProject ->
|
31
|
+
def enableHermes = targetProject.ext.react.get("enableHermes", false)
|
32
|
+
def jscFlavor = 'org.webkit:android-jsc:+'
|
33
|
+
|
39
34
|
targetProject.dependencies {
|
40
35
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
41
36
|
|
@@ -61,7 +56,22 @@ ext.applyNorcyCommonDependencies = { targetProject, enableHermes, jscFlavor ->
|
|
61
56
|
}
|
62
57
|
}
|
63
58
|
|
64
|
-
ext.
|
59
|
+
ext.applyBuildTypes = { targetProject ->
|
60
|
+
targetProject.android {
|
61
|
+
buildTypes {
|
62
|
+
debug {
|
63
|
+
signingConfig signingConfigs.debug
|
64
|
+
}
|
65
|
+
release {
|
66
|
+
minifyEnabled false
|
67
|
+
proguardFiles targetProject.android.getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
68
|
+
crunchPngs false
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
ext.applyCommonAndroidConfig = { targetProject ->
|
65
75
|
targetProject.android {
|
66
76
|
compileOptions {
|
67
77
|
sourceCompatibility JavaVersion.VERSION_1_8
|
@@ -97,3 +107,23 @@ ext.applyNorcyCommonAndroidConfig = { targetProject ->
|
|
97
107
|
}
|
98
108
|
}
|
99
109
|
|
110
|
+
ext.applyCommonPlugins = { targetProject ->
|
111
|
+
targetProject.apply from: targetProject.file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
|
112
|
+
targetProject.applyNativeModulesAppBuildGradle(targetProject)
|
113
|
+
|
114
|
+
targetProject.apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
|
115
|
+
targetProject.apply from: "../../node_modules/@sentry/react-native/sentry.gradle"
|
116
|
+
|
117
|
+
targetProject.ext.sentryCli = [
|
118
|
+
logLevel: "debug",
|
119
|
+
sentryProperties: "../sentry.properties"
|
120
|
+
]
|
121
|
+
}
|
122
|
+
|
123
|
+
ext.applyAll = { targetProject ->
|
124
|
+
applyDefaultConfig(targetProject)
|
125
|
+
applyBuildTypes(targetProject)
|
126
|
+
applyCommonAndroidConfig(targetProject)
|
127
|
+
applyCommonPlugins(targetProject)
|
128
|
+
}
|
129
|
+
|