Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a warning mechanism to alert developers when Gradle tasks are executed from the root context instead of the app module context, which may cause build issues in React Native projects with the RNRepo plugin.
Changes:
- Added
checkAndWarnCommandContext()function to detect and warn when tasks are not prefixed with:apporapp - Updated README.md documentation to use the recommended
:app:prefix in the example command
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/gradle-client/rnrepo-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt | Implemented warning logic to check task context and alert users when commands are run from root instead of app module |
| packages/gradle-client/rnrepo-plugin/README.md | Updated documentation example to demonstrate correct usage with :app: prefix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...es/gradle-client/rnrepo-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt
Show resolved
Hide resolved
...es/gradle-client/rnrepo-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt
Show resolved
Hide resolved
...es/gradle-client/rnrepo-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt
Show resolved
Hide resolved
kmagiera
left a comment
There was a problem hiding this comment.
Isn't there a better way to solve this? What are the issues with launching the command without :app: specifier? If this makes the build process fail completely, we shouldn't run the plugin. Or maybe we can limit the plugin to only scanning tasks that are within the :app: ??
📝 Description
Adds warning if plugin was launched from non app
🎯 Type of Change
🧪 Testing
📋 Additional Notes
Follows #216