Skip to content

[GRADLE PLUGIN] App prefix warning#217

Draft
radoslawrolka wants to merge 3 commits intomainfrom
rolkrado/app-prefix
Draft

[GRADLE PLUGIN] App prefix warning#217
radoslawrolka wants to merge 3 commits intomainfrom
rolkrado/app-prefix

Conversation

@radoslawrolka
Copy link
Collaborator

📝 Description

Adds warning if plugin was launched from non app

🎯 Type of Change

  • ✨ New feature (non-breaking change which adds functionality)

🧪 Testing

Zrzut ekranu 2026-01-19 o 10 23 41

📋 Additional Notes

Follows #216

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 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 :app or app
  • 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.

Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

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

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: ??

@radoslawrolka radoslawrolka marked this pull request as draft February 2, 2026 09:04
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.

3 participants