-
-
Notifications
You must be signed in to change notification settings - Fork 987
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: automatically copy codegen artifacts to paper (#2933)
## 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 <[email protected]>
- Loading branch information
1 parent
2b0425b
commit 50dfe9a
Showing
6 changed files
with
171 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Test Paper Architecture integrity | ||
on: [pull_request] | ||
jobs: | ||
check: | ||
if: github.repository == 'software-mansion/react-native-gesture-handler' | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: kotlin-lint-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Java 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'oracle' | ||
java-version: '17' | ||
|
||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
cache: 'yarn' | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install node dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Install node dependencies of FabricExample | ||
run: (cd FabricExample && yarn install --frozen-lockfile) | ||
|
||
- name: Restore build from cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
android/build | ||
android/.gradle | ||
key: ${{ runner.os }}-kotlin-lint-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'android/build.gradle') }} | ||
|
||
- name: Check old arch integrity | ||
run: yarn checkIntegrity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
.../src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters