fix: broken support for custom appProjectName in Gradle Plugin#275
Open
fix: broken support for custom appProjectName in Gradle Plugin#275
appProjectName in Gradle Plugin#275Conversation
…y read GP extension values
…lving app project
Contributor
There was a problem hiding this comment.
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 anafterEvaluateblock so extension configuration is applied. - Use the configured
appProjectNamewhen wiring thecreateBundle...JsAndAssetsdependency 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.
...act/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/VariantProcessor.kt
Outdated
Show resolved
Hide resolved
hurali97
approved these changes
Mar 17, 2026
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 PR resolves the problem experienced in #260:
RNSourceSets::configurefrom anafterEvaluateblock - otherwise, the extension's config fields are not set and carry default valuesappProjectNamefield from GP's extensions to dynamically resolve task name inVariantProcessor(which so far used a hardcoded:app:...task path)Test plan
CI green