@norcy/react-native-toolkit 0.2.34 → 0.2.36

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.
@@ -129,11 +129,30 @@ ext.applyCommonPlugins = { targetProject ->
129
129
  ]
130
130
  }
131
131
 
132
+ ext.fixBundleResourcesDependency = { targetProject ->
133
+ // AGP 7.3.1 + Gradle 8.0 的 addGeneratedSourceDirectory 对 res 未正确建立任务依赖,
134
+ // 导致 mergeReleaseResources 在 createBundleReleaseJsAndAssets 之前执行,图片资源无法打入 APK
135
+ targetProject.afterEvaluate {
136
+ targetProject.android.applicationVariants.all { variant ->
137
+ def variantName = variant.name.capitalize()
138
+ def bundleTaskName = "createBundle${variantName}JsAndAssets"
139
+ def mergeTaskName = "merge${variantName}Resources"
140
+ def bundleTask = targetProject.tasks.findByName(bundleTaskName)
141
+ if (bundleTask) {
142
+ targetProject.tasks.named(mergeTaskName).configure {
143
+ dependsOn(bundleTask)
144
+ }
145
+ }
146
+ }
147
+ }
148
+ }
149
+
132
150
  ext.applyAll = { targetProject ->
133
151
  applyDefaultConfig(targetProject)
134
152
  applyBuildTypes(targetProject)
135
153
  applyCommonAndroidConfig(targetProject)
136
154
  applyCommonPlugins(targetProject)
137
155
  applyCommonDependencies(targetProject)
156
+ fixBundleResourcesDependency(targetProject)
138
157
  }
139
158
 
@@ -14,6 +14,13 @@ allprojects {
14
14
  google()
15
15
  }
16
16
 
17
+ configurations.all {
18
+ resolutionStrategy {
19
+ force 'androidx.viewpager2:viewpager2:1.0.0'
20
+ force 'androidx.annotation:annotation-experimental:1.3.1'
21
+ }
22
+ }
23
+
17
24
  afterEvaluate { project ->
18
25
  if (project.hasProperty("android")) {
19
26
  android {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norcy/react-native-toolkit",
3
- "version": "0.2.34",
3
+ "version": "0.2.36",
4
4
  "private": false,
5
5
  "description": "My Toolkit",
6
6
  "main": "lib/commonjs/index",