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

feat: add task to automatically copy codegen files to paper #2288

Conversation

maciekstosio
Copy link
Collaborator

Description

Sibling of similar task from screens.
When changing native props on Fabric, codegen generates corresponding interfaces and delegates. To make sure both implementations are consistent, we implement those interfaces on Paper too. Currently, after generating interfaces using codegen, developer needs to copy corresponding files for paper manually. This task adds Gradle task, that automates this.

Changes

Add new task to build Gradle and necessary properties:

  • codegen artifacts dir and paper dir
  • flag in both fabric apps that indicates that copying should be performed (we do want this task to be performed only when developing the library)

Test code and steps to reproduce

Remove maskUnits from src/fabric/MaskNativeComponent.ts and run ./gradlew generateCodegenArtifactsFromSchema in ./FabricExample/android. That should automatically copy regenerated files to paper directory.

@maciekstosio
Copy link
Collaborator Author

maciekstosio commented Jul 10, 2024

Closing for now, will be replaced with software-mansion/react-native-screens#2224

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