mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
Changes moved from: https://github.com/software-mansion/react-native-screens/pull/2224 ## 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 Current assumption: Two scripts: `check-archs-consistency` and `sync-archs`. The first one generates codegen interfaces and compares them with what we have for paper, the second generates and copies for paper to sync the archs. - sync is run when staged on changes to `src/paper` - check is run on CI when `src/paper` or `android/src/paper/java/com/facebook/react/viewmanagers` changes ## Test code and steps to reproduce Open `src/fabric/LineNativeComponent.ts` or/and `src/fabric/NativeSvgRenderableModule.ts` and remove any proper form interface. Now: - when building paper, interface should be updated - when committing, interface should be updated - if committed and pushed, Test consistency between Paper & Fabric should fail :) Brining back the prop and repeating up should cause the interface back and CI green. Posting changes in other places should cause CI task to run. You can also run those commands yourself using `yarn check-archs-consistency` and `yarn sync-archs`