-
-
Notifications
You must be signed in to change notification settings - Fork 512
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 gradle task to automatically copy the codegen artifacts for paper #2168
feat: Add gradle task to automatically copy the codegen artifacts for paper #2168
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Left some remarks below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answered you question, final notes & whitespaces.
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
…en-artifacts' of github.com:software-mansion/react-native-screens into @maciekstosio/Add-gradle-task-to-automate-copying-codegen-artifacts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some polishing and I think we're good to go
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can proceed
## Description Sibling of [similar task from screens](software-mansion/react-native-screens#2168). 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 `enabled` from `src/specs/RNGestureHandlerButtonNativeComponent.ts` and run ` ./gradlew generateCodegenArtifactsFromSchema` in `./FabricExample/android`. That should automatically copy regenerated files to paper directory. --------- Co-authored-by: Jakub Piasecki <jakub.piasecki@swmansion.com>
Description
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:
Test code and steps to reproduce
Remove
textColor
fromsrc/fabric/SearchBarNativeComponent.ts
and run./gradlew generateCodegenArtifactsFromSchema
in/react-native-screens/FabricExample/android
. That should automatically copy regenerated files to paper directory.