@react-native/gradle-plugin 0.76.0-rc.0 → 0.77.0-nightly-20240911-a05f9c677
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-all.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
package/package.json
CHANGED
|
@@ -188,6 +188,7 @@ abstract class ReactExtension @Inject constructor(val project: Project) {
|
|
|
188
188
|
?.dependencies
|
|
189
189
|
?.values
|
|
190
190
|
?.filter { it.platforms?.android !== null }
|
|
191
|
+
?.filterNot { it.platforms?.android?.isPureCxxDependency == true }
|
|
191
192
|
?.forEach { deps ->
|
|
192
193
|
val nameCleansed = deps.nameCleansed
|
|
193
194
|
val dependencyConfiguration = deps.platforms?.android?.dependencyConfiguration
|
|
@@ -189,6 +189,44 @@ class ReactExtensionTest {
|
|
|
189
189
|
assertThat(deps).isEmpty()
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
@Test
|
|
193
|
+
fun getGradleDependenciesToApply_withIsPureCxxDeps_filtersCorrectly() {
|
|
194
|
+
val validJsonFile =
|
|
195
|
+
createJsonFile(
|
|
196
|
+
"""
|
|
197
|
+
{
|
|
198
|
+
"reactNativeVersion": "1000.0.0",
|
|
199
|
+
"dependencies": {
|
|
200
|
+
"@react-native/oss-library-example": {
|
|
201
|
+
"root": "./node_modules/@react-native/android-example",
|
|
202
|
+
"name": "@react-native/android-example",
|
|
203
|
+
"platforms": {
|
|
204
|
+
"android": {
|
|
205
|
+
"sourceDir": "src/main/java",
|
|
206
|
+
"packageImportPath": "com.facebook.react"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"@react-native/another-library-for-testing": {
|
|
211
|
+
"root": "./node_modules/@react-native/cxx-testing",
|
|
212
|
+
"name": "@react-native/cxx-testing",
|
|
213
|
+
"platforms": {
|
|
214
|
+
"android": {
|
|
215
|
+
"sourceDir": "src/main/java",
|
|
216
|
+
"packageImportPath": "com.facebook.react",
|
|
217
|
+
"isPureCxxDependency": true
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
"""
|
|
224
|
+
.trimIndent())
|
|
225
|
+
|
|
226
|
+
val deps = getGradleDependenciesToApply(validJsonFile)
|
|
227
|
+
assertThat(deps).containsExactly("implementation" to ":react-native_android-example")
|
|
228
|
+
}
|
|
229
|
+
|
|
192
230
|
private fun createJsonFile(@Language("JSON") input: String) =
|
|
193
231
|
tempFolder.newFile().apply { writeText(input) }
|
|
194
232
|
}
|