@norcy/react-native-toolkit 0.2.37 → 0.3.1
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/buildscript.gradle +6 -6
- package/android/dependencies.gradle +10 -13
- package/android/root.gradle +4 -2
- package/package.json +3 -13
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
ext.applyBuildscriptExt = {
|
|
2
|
-
ext.buildToolsVersion = "
|
|
3
|
-
ext.minSdkVersion =
|
|
4
|
-
ext.compileSdkVersion =
|
|
5
|
-
ext.targetSdkVersion =
|
|
6
|
-
ext.ndkVersion = "
|
|
7
|
-
ext.kotlinVersion = "1.
|
|
2
|
+
ext.buildToolsVersion = "34.0.0"
|
|
3
|
+
ext.minSdkVersion = 23
|
|
4
|
+
ext.compileSdkVersion = 34
|
|
5
|
+
ext.targetSdkVersion = 34
|
|
6
|
+
ext.ndkVersion = "26.1.10909125"
|
|
7
|
+
ext.kotlinVersion = "1.9.22"
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
ext.applyBuildscriptRepos = { handler ->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
ext.applyDefaultConfig = { targetProject ->
|
|
2
2
|
targetProject.android {
|
|
3
|
-
|
|
3
|
+
compileSdk targetProject.rootProject.ext.compileSdkVersion
|
|
4
4
|
ndkVersion targetProject.rootProject.ext.ndkVersion
|
|
5
5
|
|
|
6
6
|
defaultConfig {
|
|
@@ -88,8 +88,8 @@ ext.applyBuildTypes = { targetProject ->
|
|
|
88
88
|
ext.applyCommonAndroidConfig = { targetProject ->
|
|
89
89
|
targetProject.android {
|
|
90
90
|
compileOptions {
|
|
91
|
-
sourceCompatibility JavaVersion.
|
|
92
|
-
targetCompatibility JavaVersion.
|
|
91
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
92
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
packagingOptions {
|
|
@@ -130,20 +130,17 @@ ext.applyCommonPlugins = { targetProject ->
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
ext.fixBundleResourcesDependency = { targetProject ->
|
|
133
|
-
//
|
|
134
|
-
//
|
|
133
|
+
// release 打包时须把 Metro 生成的 drawable 注册进 AGP,否则 JS 里 require 的本地图不会进 APK。
|
|
134
|
+
// 当前 RN Gradle 插件里声明的 resourcesDir 与 Metro 实际写入目录不一致,需用 registerGeneratedResFolders 指向真实路径。
|
|
135
|
+
// 可删除时机:升级 RN / @react-native/gradle-plugin 后,若官方已对齐路径或资源合并已正确,assembleRelease 验证本地图正常即可整段删掉。
|
|
135
136
|
targetProject.afterEvaluate {
|
|
136
137
|
targetProject.android.applicationVariants.all { variant ->
|
|
137
|
-
def
|
|
138
|
-
def bundleTaskName = "createBundle${
|
|
139
|
-
def mergeTaskName = "merge${variantName}Resources"
|
|
138
|
+
def variantCap = variant.name.capitalize()
|
|
139
|
+
def bundleTaskName = "createBundle${variantCap}JsAndAssets"
|
|
140
140
|
def bundleTask = targetProject.tasks.findByName(bundleTaskName)
|
|
141
141
|
if (bundleTask) {
|
|
142
|
-
def resDir =
|
|
143
|
-
|
|
144
|
-
targetProject.tasks.named(mergeTaskName).configure {
|
|
145
|
-
dependsOn(bundleTask)
|
|
146
|
-
}
|
|
142
|
+
def resDir = new File(targetProject.buildDir, "RES/createBundle${variantCap}JsAndAssets")
|
|
143
|
+
variant.registerGeneratedResFolders(targetProject.files(resDir).builtBy(bundleTask))
|
|
147
144
|
}
|
|
148
145
|
}
|
|
149
146
|
}
|
package/android/root.gradle
CHANGED
|
@@ -25,11 +25,13 @@ allprojects {
|
|
|
25
25
|
if (project.hasProperty("android")) {
|
|
26
26
|
android {
|
|
27
27
|
compileOptions {
|
|
28
|
-
sourceCompatibility JavaVersion.
|
|
29
|
-
targetCompatibility JavaVersion.
|
|
28
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
29
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
apply plugin: "com.facebook.react.rootproject"
|
|
37
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@norcy/react-native-toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "My Toolkit",
|
|
6
6
|
"main": "lib/commonjs/index",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/core": "^7.20.0",
|
|
49
49
|
"@babel/preset-env": "^7.20.0",
|
|
50
|
+
"@react-native/babel-preset": "0.74.88",
|
|
50
51
|
"@commitlint/cli": "^19.5.0",
|
|
51
52
|
"@commitlint/config-conventional": "^19.5.0",
|
|
52
53
|
"@invertase/react-native-apple-authentication": "^2.1.2",
|
|
@@ -61,7 +62,6 @@
|
|
|
61
62
|
"@sentry/react-native": "^6.12.0",
|
|
62
63
|
"@types/jest": "^29.5.13",
|
|
63
64
|
"@types/react": "^18.2.0",
|
|
64
|
-
"@types/react-native": "0.72.5",
|
|
65
65
|
"baseline-browser-mapping": "^2.10.7",
|
|
66
66
|
"eslint": "^8.57.1",
|
|
67
67
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"prettier": "^3.3.3",
|
|
76
76
|
"query-string": "^8.0.0",
|
|
77
77
|
"react": "18.2.0",
|
|
78
|
-
"react-native": "0.
|
|
78
|
+
"react-native": "0.74.6",
|
|
79
79
|
"react-native-blob-util": "^0.19.11",
|
|
80
80
|
"react-native-builder-bob": "^0.30.2",
|
|
81
81
|
"react-native-device-info": "^11.1.0",
|
|
@@ -187,16 +187,6 @@
|
|
|
187
187
|
]
|
|
188
188
|
},
|
|
189
189
|
"resolutions": {
|
|
190
|
-
"@react-native-community/cli": "~11.3.10",
|
|
191
|
-
"@react-native-community/cli-tools": "11.3.10",
|
|
192
|
-
"@react-native-community/cli-platform-android": "~11.3.10",
|
|
193
|
-
"@react-native-community/cli-platform-ios": "~11.3.10",
|
|
194
|
-
"@react-native-community/cli-plugin-metro": "~11.3.10",
|
|
195
|
-
"@react-native-community/cli-config": "~11.3.10",
|
|
196
|
-
"@react-native-community/cli-doctor": "~11.3.10",
|
|
197
|
-
"@react-native-community/cli-hermes": "~11.3.10",
|
|
198
|
-
"@react-native-community/cli-server-api": "~11.3.10",
|
|
199
|
-
"@react-native-community/cli-clean": "~11.3.10",
|
|
200
190
|
"@types/react": "18.2.0",
|
|
201
191
|
"del": "^5.1.0",
|
|
202
192
|
"glob": "^8.1.0",
|