Skip to content

fix: remove unnecessary react plugin to avoid duplicate class generation#11

Open
aryaminus wants to merge 2 commits intocactus-compute:mainfrom
aryaminus:fix/remove-react-plugin
Open

fix: remove unnecessary react plugin to avoid duplicate class generation#11
aryaminus wants to merge 2 commits intocactus-compute:mainfrom
aryaminus:fix/remove-react-plugin

Conversation

@aryaminus
Copy link

@aryaminus aryaminus commented Nov 27, 2025

Summary

  • Remove com.facebook.react plugin to prevent duplicate class generation for TurboModules in the monorepo.
  • The library uses Nitrogen for bindings, making the standard Codegen plugin unnecessary and conflicting.

Motivation

The com.facebook.react plugin is primarily for apps. When applied to a library in a workspace, it scans dependencies and generates code for TurboModules (like react-native-safe-area-context). Since the example app also applies this plugin, it causes duplicate class errors (e.g., RNCSafeAreaProviderManagerDelegate). This library uses Nitrogen, so the standard plugin is not required.

Copilot AI review requested due to automatic review settings November 27, 2025 21:24
Copy link

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 removes the com.facebook.react plugin from the library's Android build configuration to prevent duplicate class generation in a monorepo setup. The library uses Nitrogen/Nitro for code generation instead of React Native's standard Codegen, making the React plugin unnecessary and conflicting when both the library and example app apply it.

Key Changes

  • Removed apply plugin: "com.facebook.react" from the library's android/build.gradle
  • This prevents duplicate TurboModule class generation (e.g., RNCSafeAreaProviderManagerDelegate) when the example app also scans dependencies

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

1 participant