Skip to content

Commit 0d87e2c

Browse files
authored
Remove paper support (#3639)
## Description This PR removes all paper support. Tested on all platforms, all `basic-example`, `expo-example` and `macos-example` build and run successfully. Fixme: - `yarn lint:android` does not work anymore ## Test plan - Start `expo-example` and `basic-example` apps on: `Android`, `iOS` and `MacOS`
1 parent 319fe86 commit 0d87e2c

32 files changed

+54
-755
lines changed

.github/workflows/check-archs-consistency.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

apps/macos-example/macos/Podfile.lock

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,31 +1504,6 @@ PODS:
15041504
- ReactCodegen
15051505
- ReactCommon/turbomodule/bridging
15061506
- ReactCommon/turbomodule/core
1507-
- RNGestureHandler/shared (= 2.25.0)
1508-
- Yoga
1509-
- RNGestureHandler/shared (2.25.0):
1510-
- DoubleConversion
1511-
- glog
1512-
- hermes-engine
1513-
- RCT-Folly (= 2024.11.18.00)
1514-
- RCTRequired
1515-
- RCTTypeSafety
1516-
- React-Core
1517-
- React-debug
1518-
- React-Fabric
1519-
- React-featureflags
1520-
- React-graphics
1521-
- React-hermes
1522-
- React-ImageManager
1523-
- React-jsi
1524-
- React-NativeModulesApple
1525-
- React-RCTFabric
1526-
- React-renderercss
1527-
- React-rendererdebug
1528-
- React-utils
1529-
- ReactCodegen
1530-
- ReactCommon/turbomodule/bridging
1531-
- ReactCommon/turbomodule/core
15321507
- Yoga
15331508
- RNReanimated (3.18.0):
15341509
- DoubleConversion
@@ -1879,8 +1854,8 @@ SPEC CHECKSUMS:
18791854
React-debug: 9ef45d64b88281e7e629158410ceb61b3bb51ea0
18801855
React-defaultsnativemodule: 4e5646f85edca54998efb35efac242045d1123dc
18811856
React-domnativemodule: aa0750129c97675305ad52da5e0525985a7bc1c9
1882-
React-Fabric: 20a409df4dc64d8139324f707837bfa72d5663ce
1883-
React-FabricComponents: a8ad8665dacbf82a4669f5a4e55531594c65601b
1857+
React-Fabric: e5670d9e6c90650fc3d8b86eedfb3a75b80152cb
1858+
React-FabricComponents: d1e9208aa6b2134bb1c18d8a42cf4c975ffc755d
18841859
React-FabricImage: 309d4ebb53631461fc8108b7b3ce6dc84f135a20
18851860
React-featureflags: 46790800dbdeb1305b3b12427b4d18413dadd13e
18861861
React-featureflagsnativemodule: eb77d500c3770978e9c1c8e6f3f36a923ca7eecf
@@ -1926,12 +1901,12 @@ SPEC CHECKSUMS:
19261901
ReactCodegen: 3d30536e47f328f0a297d897cb789e46a092c2a6
19271902
ReactCommon: 0f22e3dd34a8215b8482778898f6e1e95572c498
19281903
RNCAsyncStorage: b9f5f78da5d16a853fe3dc22e8268d932fc45a83
1929-
RNGestureHandler: 9ea0b24ab06251465e366792c8d1a8f96d7a41ad
1904+
RNGestureHandler: cae3c899259949424d97bbe309c68be7c673cff6
19301905
RNReanimated: 6ccc6e6826ada6643d2e6474d95f37a1fbf7771d
19311906
RNSVG: 4c63b12b7b5761063bca4f20dd228f6a8370f614
19321907
SocketRocket: 03f7111df1a343b162bf5b06ead333be808e1e0a
19331908
Yoga: f89a870053f1a8fbee8c98e35a1b9eff44ce2015
19341909

19351910
PODFILE CHECKSUM: ba6f2105d3e43bf0ae77356a9afcc8b532e3c306
19361911

1937-
COCOAPODS: 1.15.2
1912+
COCOAPODS: 1.16.2

packages/react-native-gesture-handler/RNGestureHandler.podspec

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ Pod::Spec.new do |s|
2424
"OTHER_CFLAGS" => "$(inherited) " + compilation_metadata_generation_flag
2525
}
2626

27-
if defined?(install_modules_dependencies()) != nil
28-
install_modules_dependencies(s);
29-
else
30-
s.dependency "React-Core"
31-
end
27+
install_modules_dependencies(s);
3228

33-
if ENV['USE_FRAMEWORKS'] != nil && ENV['RCT_NEW_ARCH_ENABLED'] == '1'
29+
if ENV['USE_FRAMEWORKS'] != nil
3430
add_dependency(s, "React-FabricComponents", :additional_framework_paths => [
3531
"react/renderer/textlayoutmanager/platform/ios",
3632
"react/renderer/components/textinput/platform/ios",

packages/react-native-gesture-handler/android/build.gradle

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ buildscript {
1616
}
1717
}
1818

19-
def isNewArchitectureEnabled() {
20-
// To opt-in for the New Architecture, you can either:
21-
// - Set `newArchEnabled` to true inside the `gradle.properties` file
22-
// - Invoke gradle with `-newArchEnabled=true`
23-
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
24-
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
25-
}
26-
2719
def safeExtGet(prop, fallback) {
2820
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
2921
}
@@ -57,6 +49,11 @@ def resolveReactNativeDirectory() {
5749
)
5850
}
5951

52+
def isNewArchitectureEnabled() {
53+
// This is a workaround for linter crashing when applying the `com.facebook.react` plugin.
54+
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
55+
}
56+
6057
if (isNewArchitectureEnabled()) {
6158
apply plugin: 'com.facebook.react'
6259
}
@@ -147,20 +144,16 @@ android {
147144
defaultConfig {
148145
minSdkVersion safeExtGet('minSdkVersion', 24)
149146
targetSdkVersion safeExtGet('targetSdkVersion', 33)
150-
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
151147
buildConfigField "int", "REACT_NATIVE_MINOR_VERSION", REACT_NATIVE_MINOR_VERSION.toString()
152148

153-
if (isNewArchitectureEnabled()) {
154-
var appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
155-
externalNativeBuild {
156-
cmake {
157-
cppFlags "-O2", "-frtti", "-fexceptions", "-Wall", "-Werror", "-std=c++20", "-DANDROID"
158-
arguments "-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}",
159-
"-DREACT_NATIVE_MINOR_VERSION=${REACT_NATIVE_MINOR_VERSION}",
160-
"-DANDROID_STL=c++_shared",
161-
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
162-
abiFilters(*reactNativeArchitectures())
163-
}
149+
externalNativeBuild {
150+
cmake {
151+
cppFlags "-O2", "-frtti", "-fexceptions", "-Wall", "-Werror", "-std=c++20", "-DANDROID"
152+
arguments "-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}",
153+
"-DREACT_NATIVE_MINOR_VERSION=${REACT_NATIVE_MINOR_VERSION}",
154+
"-DANDROID_STL=c++_shared",
155+
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
156+
abiFilters(*reactNativeArchitectures())
164157
}
165158
}
166159
}
@@ -170,11 +163,9 @@ android {
170163
targetCompatibility JavaVersion.VERSION_1_8
171164
}
172165

173-
if (isNewArchitectureEnabled()) {
174-
externalNativeBuild {
175-
cmake {
176-
path "src/main/jni/CMakeLists.txt"
177-
}
166+
externalNativeBuild {
167+
cmake {
168+
path "src/main/jni/CMakeLists.txt"
178169
}
179170
}
180171

@@ -202,14 +193,6 @@ android {
202193
} else {
203194
srcDirs += 'nosvg/src/main/java'
204195
}
205-
206-
if (isNewArchitectureEnabled()) {
207-
srcDirs += 'fabric/src/main/java'
208-
} else {
209-
// 'paper/src/main/java' includes files from codegen so the library can compile with
210-
// codegen turned off
211-
srcDirs += 'paper/src/main/java'
212-
}
213196
}
214197
}
215198

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

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

packages/react-native-gesture-handler/android/paper/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java

Lines changed: 0 additions & 60 deletions
This file was deleted.

packages/react-native-gesture-handler/android/paper/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java

Lines changed: 0 additions & 27 deletions
This file was deleted.

packages/react-native-gesture-handler/android/paper/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

packages/react-native-gesture-handler/android/paper/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)