Skip to content

Remove paper support #3639

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

Open
wants to merge 32 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2efa4d5
drop support in android build
latekvo Jul 25, 2025
172a96c
remove android paper dirs
latekvo Jul 25, 2025
847b138
remove paper build cfg usages
latekvo Jul 25, 2025
f09e7d4
flatten split files
latekvo Jul 25, 2025
b4a1628
force fabric on expo example
latekvo Jul 25, 2025
4b58d06
remove non-existant android files from package
latekvo Jul 25, 2025
8883496
remove paper CIs
latekvo Jul 25, 2025
4298e09
remove paper check from iOS build config
latekvo Jul 25, 2025
0acfea0
remove all obj-c old arch macros
latekvo Jul 25, 2025
46dfef2
revert package reassignment
latekvo Jul 25, 2025
0c81d9a
remove old arch scripts
latekvo Jul 28, 2025
4730f8a
remove script entries from package.json
latekvo Jul 28, 2025
42f3b8f
revert import ordering change
latekvo Jul 28, 2025
95036c3
remove unused file from pkg
latekvo Jul 28, 2025
90fa341
(amend) remove unused file from pkg
latekvo Jul 28, 2025
ab204e3
fix android build crash
latekvo Jul 28, 2025
5204369
fix macos build crash
latekvo Jul 28, 2025
ec3f17d
update Podfile.lock file
latekvo Jul 28, 2025
1502684
simplify macos macro
latekvo Jul 29, 2025
b396263
remove unused method
latekvo Jul 29, 2025
dc2d57b
Merge branch 'next' into @latekvo/remove-paper-support-new
latekvo Aug 8, 2025
8422097
workaround for linter crashing
latekvo Aug 8, 2025
b0893d3
Merge branch '@latekvo/remove-paper-support-new' of https://github.co…
latekvo Aug 8, 2025
0c29eb2
fix linting error
latekvo Aug 8, 2025
db2c927
fix macos build crash
latekvo Aug 8, 2025
a853c6b
remove unused gradle var
latekvo Aug 8, 2025
a257641
use universal view instead of splitting
latekvo Aug 11, 2025
0a0c051
add RNGHWindow type
latekvo Aug 11, 2025
5d8fac5
add RNGHScrollView type
latekvo Aug 11, 2025
8c80d3d
force use install_modules_dependencies
latekvo Aug 12, 2025
2b8cc97
Merge branch 'next' into @latekvo/remove-paper-support-new
latekvo Aug 12, 2025
632cb0f
fix extra comma
latekvo Aug 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .github/workflows/check-archs-consistency.yml

This file was deleted.

33 changes: 4 additions & 29 deletions apps/macos-example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1504,31 +1504,6 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNGestureHandler/shared (= 2.25.0)
- Yoga
- RNGestureHandler/shared (2.25.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.11.18.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-hermes
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNReanimated (3.18.0):
- DoubleConversion
Expand Down Expand Up @@ -1879,8 +1854,8 @@ SPEC CHECKSUMS:
React-debug: 9ef45d64b88281e7e629158410ceb61b3bb51ea0
React-defaultsnativemodule: 4e5646f85edca54998efb35efac242045d1123dc
React-domnativemodule: aa0750129c97675305ad52da5e0525985a7bc1c9
React-Fabric: 20a409df4dc64d8139324f707837bfa72d5663ce
React-FabricComponents: a8ad8665dacbf82a4669f5a4e55531594c65601b
React-Fabric: e5670d9e6c90650fc3d8b86eedfb3a75b80152cb
React-FabricComponents: d1e9208aa6b2134bb1c18d8a42cf4c975ffc755d
React-FabricImage: 309d4ebb53631461fc8108b7b3ce6dc84f135a20
React-featureflags: 46790800dbdeb1305b3b12427b4d18413dadd13e
React-featureflagsnativemodule: eb77d500c3770978e9c1c8e6f3f36a923ca7eecf
Expand Down Expand Up @@ -1926,12 +1901,12 @@ SPEC CHECKSUMS:
ReactCodegen: 3d30536e47f328f0a297d897cb789e46a092c2a6
ReactCommon: 0f22e3dd34a8215b8482778898f6e1e95572c498
RNCAsyncStorage: b9f5f78da5d16a853fe3dc22e8268d932fc45a83
RNGestureHandler: 9ea0b24ab06251465e366792c8d1a8f96d7a41ad
RNGestureHandler: cae3c899259949424d97bbe309c68be7c673cff6
RNReanimated: 6ccc6e6826ada6643d2e6474d95f37a1fbf7771d
RNSVG: 4c63b12b7b5761063bca4f20dd228f6a8370f614
SocketRocket: 03f7111df1a343b162bf5b06ead333be808e1e0a
Yoga: f89a870053f1a8fbee8c98e35a1b9eff44ce2015

PODFILE CHECKSUM: ba6f2105d3e43bf0ae77356a9afcc8b532e3c306

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ Pod::Spec.new do |s|
"OTHER_CFLAGS" => "$(inherited) " + compilation_metadata_generation_flag
}

if defined?(install_modules_dependencies()) != nil
install_modules_dependencies(s);
else
s.dependency "React-Core"
end
install_modules_dependencies(s);

if ENV['USE_FRAMEWORKS'] != nil && ENV['RCT_NEW_ARCH_ENABLED'] == '1'
if ENV['USE_FRAMEWORKS'] != nil
add_dependency(s, "React-FabricComponents", :additional_framework_paths => [
"react/renderer/textlayoutmanager/platform/ios",
"react/renderer/components/textinput/platform/ios",
Expand Down
50 changes: 16 additions & 34 deletions packages/react-native-gesture-handler/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ buildscript {
}
}

def isNewArchitectureEnabled() {
// To opt-in for the New Architecture, you can either:
// - Set `newArchEnabled` to true inside the `gradle.properties` file
// - Invoke gradle with `-newArchEnabled=true`
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
Expand Down Expand Up @@ -57,6 +49,11 @@ def resolveReactNativeDirectory() {
)
}

def isNewArchitectureEnabled() {
// This is a workaround for linter crashing when applying the `com.facebook.react` plugin.
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}

Comment on lines +52 to +56
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I couldn't find any proper solution for the linter CI crashing, other than keeping this function in place.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought, but what do you think about throwing error if new architecture is not enabled?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could have some environment variable for the CI to set when it wants to exclude the react plugin from the gradle build file.

what do you think about throwing error

Not sure if that's necessary, I think React Native already throws a warning when new arch is set to false on the versions where it can't be disabled.

if (isNewArchitectureEnabled()) {
apply plugin: 'com.facebook.react'
}
Expand Down Expand Up @@ -147,20 +144,16 @@ android {
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 24)
targetSdkVersion safeExtGet('targetSdkVersion', 33)
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
buildConfigField "int", "REACT_NATIVE_MINOR_VERSION", REACT_NATIVE_MINOR_VERSION.toString()

if (isNewArchitectureEnabled()) {
var appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
externalNativeBuild {
cmake {
cppFlags "-O2", "-frtti", "-fexceptions", "-Wall", "-Werror", "-std=c++20", "-DANDROID"
arguments "-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}",
"-DREACT_NATIVE_MINOR_VERSION=${REACT_NATIVE_MINOR_VERSION}",
"-DANDROID_STL=c++_shared",
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
abiFilters(*reactNativeArchitectures())
}
externalNativeBuild {
cmake {
cppFlags "-O2", "-frtti", "-fexceptions", "-Wall", "-Werror", "-std=c++20", "-DANDROID"
arguments "-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}",
"-DREACT_NATIVE_MINOR_VERSION=${REACT_NATIVE_MINOR_VERSION}",
"-DANDROID_STL=c++_shared",
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
abiFilters(*reactNativeArchitectures())
}
}
}
Expand All @@ -170,11 +163,9 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

if (isNewArchitectureEnabled()) {
externalNativeBuild {
cmake {
path "src/main/jni/CMakeLists.txt"
}
externalNativeBuild {
cmake {
path "src/main/jni/CMakeLists.txt"
}
}

Expand Down Expand Up @@ -202,14 +193,6 @@ android {
} else {
srcDirs += 'nosvg/src/main/java'
}

if (isNewArchitectureEnabled()) {
srcDirs += 'fabric/src/main/java'
} else {
// 'paper/src/main/java' includes files from codegen so the library can compile with
// codegen turned off
srcDirs += 'paper/src/main/java'
}
}
}

Expand All @@ -233,7 +216,6 @@ def kotlin_version = safeExtGet('kotlinVersion', project.properties['RNGH_kotlin
dependencies {
implementation 'com.facebook.react:react-native:+' // from node_modules


if (shouldUseCommonInterfaceFromReanimated()) {
// Include Reanimated as dependency to load the common interface
implementation(rootProject.subprojects.find { it.name == 'react-native-reanimated' }) {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading