feat: arrange the correct order for evaluating expo transitive dependencies#238
Merged
feat: arrange the correct order for evaluating expo transitive dependencies#238
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the Expo transitive dependencies resolution to ensure correct evaluation order in the Gradle build lifecycle. The changes move the dependency resolution logic from the configuration phase to the afterEvaluate block, ensuring that Expo projects are first linked as AARs before transitive dependencies are resolved.
Changes:
- Moved ExpoPublishingHelper instantiation and execution from configuration phase to afterEvaluate block in RNBrownfieldPlugin
- Refactored ExpoPublishingHelper to remove unused expoProject constructor parameter and rename configure() to afterEvaluate()
- Limited Maven POM dependency resolution to only include dependencies with explicit "compile" scope
- Simplified Gradle configuration processing to only check "implementation" and "api" configurations
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| RNBrownfieldPlugin.kt | Moved ExpoPublishingHelper execution to afterEvaluate block to ensure proper evaluation order; added evaluationDependsOn call during configuration phase |
| ExpoPublishingHelper.kt | Removed unused expoProject parameter; renamed configure() to afterEvaluate(); restricted Maven scope filtering to explicit "compile" scope only; simplified Gradle configuration filtering to use getByName for "implementation" and "api" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...react/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/ExpoPublishingHelper.kt
Outdated
Show resolved
Hide resolved
...react/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/ExpoPublishingHelper.kt
Outdated
Show resolved
Hide resolved
...react/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/ExpoPublishingHelper.kt
Outdated
Show resolved
Hide resolved
...react/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/ExpoPublishingHelper.kt
Outdated
Show resolved
Hide resolved
artus9033
approved these changes
Feb 23, 2026
Collaborator
artus9033
left a comment
There was a problem hiding this comment.
LGTM after just modifying the transitive variant filter to include variant-specific configurations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This arranges the correct order for Expo Transitive Dependencies resolution by moving the implementation to the
afterEvaluateblock under BrownfieldGradlePlugin, after theafterEvaluatelocal function call.This ensures that first the
embedExpoDependencieswill be invoked, which links the expo projects to the AAR and then we do the work for resolving the transitive dependencies.This PR also does:
compilewhile evaluating transitive dependencies from Mavenimplementationandapiconfiguration while evaluating transitive dependencies from locally linked expo projectsgetByTypeto smartly retrieve the corresponding configurationTest plan
CI Passes - 🟢