From 38560371dd36fe58ecc7d3a52174c4c8b943d9fd Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 19 Apr 2024 10:34:22 +0200 Subject: [PATCH 1/7] Ingore Cxx build results in Android --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 29cbf019..0aa21a68 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ build/ .gradle local.properties *.iml +.cxx # node.js # From edc137b74867c383d20e611514a09c5f066a8944 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 19 Apr 2024 10:35:30 +0200 Subject: [PATCH 2/7] Do not include unused and non-existng package in linking --- package/android/src/main/jni/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/package/android/src/main/jni/CMakeLists.txt b/package/android/src/main/jni/CMakeLists.txt index 8881a8f0..d338ae02 100644 --- a/package/android/src/main/jni/CMakeLists.txt +++ b/package/android/src/main/jni/CMakeLists.txt @@ -51,13 +51,10 @@ target_link_libraries( react_render_graphics react_render_imagemanager react_render_mapbuffer - react_render_textlayoutmanager react_utils react_nativemodule_core rrc_image turbomodulejsijni - rrc_text - rrc_textinput rrc_view yoga ) From 95640ad4b332c977ad068a3ed546961772105dd5 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 19 Apr 2024 10:44:03 +0200 Subject: [PATCH 3/7] Introduce new arch for Android build in CI checks --- .github/workflows/ReactNativeSlider-CI.yml | 27 ++++++++++++++++++++++ example/android/gradle.properties | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ReactNativeSlider-CI.yml b/.github/workflows/ReactNativeSlider-CI.yml index c001a716..f2e57382 100644 --- a/.github/workflows/ReactNativeSlider-CI.yml +++ b/.github/workflows/ReactNativeSlider-CI.yml @@ -108,6 +108,33 @@ jobs: - name: Build the Android OS app run: cd example/android && ./gradlew assembleDebug + build-android-app-new-arch: + name: Build example app Android (Fabric) + runs-on: ubuntu-latest + needs: [build-android-app] + + steps: + - uses: actions/checkout@v4 + + - name: Pull the npm dependencies + run: npm install + + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + + - name: Use new arch config + id: cache-new-arch-gradle + uses: actions/cache@v4 + env: + cache-name: cached-gradle-new-arch-prop + with: + path: example/android/gradle.properties + key: ${{ hashFiles('./example/android/gradle.properties') }} + + - name: Build the Android OS app + run: cd example/android && ./gradlew assembleDebug build-iOS-app: name: Build example app iOS diff --git a/example/android/gradle.properties b/example/android/gradle.properties index a46a5b90..99fc223e 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -34,7 +34,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. -newArchEnabled=false +newArchEnabled=true # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. From a5623af9aeb96056f7e037f81d64195f69869fe9 Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 19 Apr 2024 11:02:31 +0200 Subject: [PATCH 4/7] Use more explicit naming for new-arch gradle prop cache --- .github/workflows/ReactNativeSlider-CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ReactNativeSlider-CI.yml b/.github/workflows/ReactNativeSlider-CI.yml index f2e57382..bb3d5c83 100644 --- a/.github/workflows/ReactNativeSlider-CI.yml +++ b/.github/workflows/ReactNativeSlider-CI.yml @@ -131,7 +131,7 @@ jobs: cache-name: cached-gradle-new-arch-prop with: path: example/android/gradle.properties - key: ${{ hashFiles('./example/android/gradle.properties') }} + key: gradle-prop-new-arch-config - name: Build the Android OS app run: cd example/android && ./gradlew assembleDebug From 60d057991a556605f09aac5ec2baf0a491dfc6ae Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 19 Apr 2024 11:09:49 +0200 Subject: [PATCH 5/7] Use old arch by default --- example/android/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 99fc223e..a46a5b90 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -34,7 +34,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. -newArchEnabled=true +newArchEnabled=false # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. From 2e49aa8cac8acab01bc6de9f8a83a29b6a8f0b1b Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 19 Apr 2024 11:10:25 +0200 Subject: [PATCH 6/7] Test the old and new arch CI checks The CI check should fail, but only for the new arch check for Android. Old arch should still succeed. This commit TEMPORARILY reverts the main fix for the issue. --- package/android/src/main/jni/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/android/src/main/jni/CMakeLists.txt b/package/android/src/main/jni/CMakeLists.txt index d338ae02..8881a8f0 100644 --- a/package/android/src/main/jni/CMakeLists.txt +++ b/package/android/src/main/jni/CMakeLists.txt @@ -51,10 +51,13 @@ target_link_libraries( react_render_graphics react_render_imagemanager react_render_mapbuffer + react_render_textlayoutmanager react_utils react_nativemodule_core rrc_image turbomodulejsijni + rrc_text + rrc_textinput rrc_view yoga ) From da9baa6684a3dea240c6d2c9f2e5ba751ba943ad Mon Sep 17 00:00:00 2001 From: BartoszKlonowski Date: Fri, 19 Apr 2024 11:27:09 +0200 Subject: [PATCH 7/7] Revert "Test the old and new arch CI checks" This reverts commit 2e49aa8cac8acab01bc6de9f8a83a29b6a8f0b1b. --- package/android/src/main/jni/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/package/android/src/main/jni/CMakeLists.txt b/package/android/src/main/jni/CMakeLists.txt index 8881a8f0..d338ae02 100644 --- a/package/android/src/main/jni/CMakeLists.txt +++ b/package/android/src/main/jni/CMakeLists.txt @@ -51,13 +51,10 @@ target_link_libraries( react_render_graphics react_render_imagemanager react_render_mapbuffer - react_render_textlayoutmanager react_utils react_nativemodule_core rrc_image turbomodulejsijni - rrc_text - rrc_textinput rrc_view yoga )