@norcy/react-native-toolkit 0.1.154 → 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 +20 -22
- 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,16 +56,14 @@ ext.applyNorcyCommonDependencies = { targetProject, enableHermes, jscFlavor ->
|
|
61
56
|
}
|
62
57
|
}
|
63
58
|
|
64
|
-
ext.
|
65
|
-
def enableProguardInReleaseBuilds = options.enableProguardInReleaseBuilds ?: false
|
66
|
-
|
59
|
+
ext.applyBuildTypes = { targetProject ->
|
67
60
|
targetProject.android {
|
68
61
|
buildTypes {
|
69
62
|
debug {
|
70
63
|
signingConfig signingConfigs.debug
|
71
64
|
}
|
72
65
|
release {
|
73
|
-
minifyEnabled
|
66
|
+
minifyEnabled false
|
74
67
|
proguardFiles targetProject.android.getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
75
68
|
crunchPngs false
|
76
69
|
}
|
@@ -78,7 +71,7 @@ ext.applyNorcyBuildTypes = { targetProject, options = [:] ->
|
|
78
71
|
}
|
79
72
|
}
|
80
73
|
|
81
|
-
ext.
|
74
|
+
ext.applyCommonAndroidConfig = { targetProject ->
|
82
75
|
targetProject.android {
|
83
76
|
compileOptions {
|
84
77
|
sourceCompatibility JavaVersion.VERSION_1_8
|
@@ -114,9 +107,7 @@ ext.applyNorcyCommonAndroidConfig = { targetProject ->
|
|
114
107
|
}
|
115
108
|
}
|
116
109
|
|
117
|
-
ext.
|
118
|
-
def sentryPropertiesPath = options.sentryPropertiesPath ?: "../sentry.properties"
|
119
|
-
|
110
|
+
ext.applyCommonPlugins = { targetProject ->
|
120
111
|
targetProject.apply from: targetProject.file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
|
121
112
|
targetProject.applyNativeModulesAppBuildGradle(targetProject)
|
122
113
|
|
@@ -125,7 +116,14 @@ ext.applyNorcyCommonPlugins = { targetProject, options = [:] ->
|
|
125
116
|
|
126
117
|
targetProject.ext.sentryCli = [
|
127
118
|
logLevel: "debug",
|
128
|
-
sentryProperties:
|
119
|
+
sentryProperties: "../sentry.properties"
|
129
120
|
]
|
130
121
|
}
|
131
122
|
|
123
|
+
ext.applyAll = { targetProject ->
|
124
|
+
applyDefaultConfig(targetProject)
|
125
|
+
applyBuildTypes(targetProject)
|
126
|
+
applyCommonAndroidConfig(targetProject)
|
127
|
+
applyCommonPlugins(targetProject)
|
128
|
+
}
|
129
|
+
|