diff --git a/gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/ExpoPublishingHelper.kt b/gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/ExpoPublishingHelper.kt index 348bddba..15f9a9c5 100644 --- a/gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/ExpoPublishingHelper.kt +++ b/gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/ExpoPublishingHelper.kt @@ -353,18 +353,15 @@ open class ExpoPublishingHelper(val brownfieldAppProject: Project) { depNodeList.childNodes.forEach { depNode -> /** * below: some nodes are not dependencies, but pure text, in which case their name is '#text' - * - * Only add dependencies with compile scope, if scope is null, default to compile */ - val scope = depNode.getChildNodeByName("scope")?.textContent - if (depNode.nodeName == "dependency" && (scope == null || scope == "compile")) { + if (depNode.nodeName == "dependency") { val groupId = depNode.getChildNodeByName("groupId")!!.textContent val maybeArtifactId = depNode.getChildNodeByName("artifactId") val artifactId = maybeArtifactId!!.textContent val version = depNode.getChildNodeByName("version")?.textContent val optional = depNode.getChildNodeByName("optional")?.textContent - + val scope = depNode.getChildNodeByName("scope")?.textContent val dependencyInfo = DependencyInfo( groupId = groupId, @@ -384,11 +381,13 @@ open class ExpoPublishingHelper(val brownfieldAppProject: Project) { pkgProject: Project, dependencies: VersionMediatingDependencySet, ) { - val configurations = pkgProject.configurations.matching { - it.name.contains("implementation", ignoreCase = true) || it.name.contains("api", ignoreCase = true) - } - configurations.forEach { - it.dependencies.forEach { dep -> + /** + * Not accounting for variant specific configurations as Expo packages are not + * using it. Should we face any issues/needs to account for it, we can do it here. + */ + listOf("implementation", "api", "runtime").forEach { + val configuration = pkgProject.configurations.findByName(it) + configuration?.dependencies?.forEach { dep -> if (dep.group != null) { dependencies.add( DependencyInfo.fromGradleDep(