Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codegenConfig to package.json to prevent generating duplicate classes #506

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

j-piasecki
Copy link
Contributor

It seems like codegen will generate duplicated files if codegenConfig property is missing from package.json (meaning all view manager delegates and interfaces will be also generated under react-native-mmkv/android/build/generated/source/codegen/react/viewmanagers). This results in the build failing due to multiple definitions of the same classes.

I'm not exactly sure what jsSrcsDir should point to in this case. It doesn't really matter as long as the library doesn't depend on the generated code, but if it points to a non-existent directory the build will fail. Since files under src aren't included in the npm package, I figured the lib/module will do. Feel free to change it if you have other ideas.

Related issue: software-mansion/react-native-gesture-handler#2382

@mrousavy
Copy link
Owner

Thank you! 🖤

@mrousavy mrousavy merged commit 9965b34 into mrousavy:master Jan 30, 2023
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.

2 participants