Skip to content

feat: arrange the correct order for evaluating expo transitive dependencies#238

Merged
hurali97 merged 7 commits intomainfrom
refactor/expo-publishing
Feb 23, 2026
Merged

feat: arrange the correct order for evaluating expo transitive dependencies#238
hurali97 merged 7 commits intomainfrom
refactor/expo-publishing

Conversation

@hurali97
Copy link
Member

@hurali97 hurali97 commented Feb 22, 2026

Summary

This arranges the correct order for Expo Transitive Dependencies resolution by moving the implementation to the afterEvaluate block under BrownfieldGradlePlugin, after the afterEvaluate local function call.

This ensures that first the embedExpoDependencies will 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:

  • Limit the scope to compile while evaluating transitive dependencies from Maven
  • Use only implementation and api configuration while evaluating transitive dependencies from locally linked expo projects
  • Uses the getByType to smartly retrieve the corresponding configuration

Test plan

CI Passes - 🟢

@hurali97 hurali97 changed the title Refactor/expo publishing feat: arrange the correct order for evaluating expo transitive dependencies Feb 23, 2026
@hurali97 hurali97 marked this pull request as ready for review February 23, 2026 08:23
Copilot AI review requested due to automatic review settings February 23, 2026 08:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

Copilot AI commented Feb 23, 2026

@hurali97 I've opened a new pull request, #242, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Collaborator

@artus9033 artus9033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after just modifying the transitive variant filter to include variant-specific configurations

@hurali97 hurali97 merged commit 891c995 into main Feb 23, 2026
8 of 9 checks passed
@hurali97 hurali97 deleted the refactor/expo-publishing branch February 23, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants