software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
6.13k stars 982 forks source link

feat: automatically copy codegen artifacts to paper #2933

Closed maciekstosio closed 5 months ago

maciekstosio commented 5 months ago

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:

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.