Skip to content

fix: broken support for custom appProjectName in Gradle Plugin#275

Open
artus9033 wants to merge 6 commits intomainfrom
fix/support-custom-appprojectname
Open

fix: broken support for custom appProjectName in Gradle Plugin#275
artus9033 wants to merge 6 commits intomainfrom
fix/support-custom-appprojectname

Conversation

@artus9033
Copy link
Collaborator

Summary

This PR resolves the problem experienced in #260:

  • fixes the Gradle plugin to invoke RNSourceSets::configure from an afterEvaluate block - otherwise, the extension's config fields are not set and carry default values
  • uses the appProjectName field from GP's extensions to dynamically resolve task name in VariantProcessor (which so far used a hardcoded :app:... task path)

Test plan

CI green

@artus9033 artus9033 requested a review from hurali97 March 17, 2026 13:28
@artus9033 artus9033 self-assigned this Mar 17, 2026
Copilot AI review requested due to automatic review settings March 17, 2026 13:28
@artus9033 artus9033 added bug Something isn't working android labels Mar 17, 2026
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

Fixes Gradle plugin behavior when the consuming app module is not named app, ensuring the plugin reads the configured reactBrownfield extension values before configuring source sets and wiring variant tasks.

Changes:

  • Invoke RNSourceSets.configure(...) from an afterEvaluate block so extension configuration is applied.
  • Use the configured appProjectName when wiring the createBundle...JsAndAssets dependency for release variants.
  • Add a changeset to publish the fix as a patch.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/VariantProcessor.kt Use extension appProjectName instead of hardcoded :app: when depending on bundling task.
gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RNBrownfieldPlugin.kt Delay RNSourceSets.configure until afterEvaluate so extension values are finalized.
.changeset/crisp-animals-drive.md Patch release notes for both packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants