You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/ExpoPublishingHelper.kt
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -354,10 +354,10 @@ open class ExpoPublishingHelper(val brownfieldAppProject: Project) {
354
354
/**
355
355
* below: some nodes are not dependencies, but pure text, in which case their name is '#text'
356
356
*
357
-
* only add dependencies with compile scope
357
+
* Only add dependencies with compile scope, if scope is null, default to compile
358
358
*/
359
359
val scope = depNode.getChildNodeByName("scope")?.textContent
360
-
if (depNode.nodeName =="dependency"&& scope =="compile") {
360
+
if (depNode.nodeName =="dependency"&&(scope ==null|| scope =="compile")) {
361
361
val groupId = depNode.getChildNodeByName("groupId")!!.textContent
362
362
val maybeArtifactId = depNode.getChildNodeByName("artifactId")
363
363
@@ -370,7 +370,7 @@ open class ExpoPublishingHelper(val brownfieldAppProject: Project) {
370
370
groupId = groupId,
371
371
artifactId = artifactId,
372
372
version = version,
373
-
scope = scope,
373
+
scope = scope?:"compile",
374
374
optional = optional?.toBoolean() ?:false,
375
375
)
376
376
@@ -385,7 +385,8 @@ open class ExpoPublishingHelper(val brownfieldAppProject: Project) {
385
385
dependencies:VersionMediatingDependencySet,
386
386
) {
387
387
listOf("implementation", "api").forEach {
388
-
pkgProject.configurations.getByName(it).dependencies.forEach { dep ->
388
+
val configuration = pkgProject.configurations.findByName(it)
0 commit comments