-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
base: next
Are you sure you want to change the base?
Remove paper support #3639
Changes from 25 commits
2efa4d5
172a96c
847b138
f09e7d4
b4a1628
4b58d06
8883496
4298e09
0acfea0
46dfef2
0c81d9a
4730f8a
42f3b8f
95036c3
90fa341
ab204e3
5204369
ec3f17d
1502684
b396263
dc2d57b
8422097
b0893d3
0c29eb2
db2c927
a853c6b
a257641
0a0c051
5d8fac5
8c80d3d
2b8cc97
632cb0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
} | ||
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
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' | ||
} | ||
|
@@ -147,27 +144,24 @@ 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", | ||
// Turn off build IDs for reproducibility (ensuring the same code will produce the same bundle when built) | ||
// See https://gitlab.com/IzzyOnDroid/repo/-/wikis/Reproducible-Builds/RB-Hints-for-Developers#no-funny-build-time-generated-ids | ||
// for more information | ||
"-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--build-id=none" | ||
abiFilters(*reactNativeArchitectures()) | ||
} | ||
ndkBuild { | ||
arguments "APP_LDFLAGS+=-Wl,--build-id=none" | ||
} | ||
var appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') } | ||
latekvo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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", | ||
// Turn off build IDs for reproducibility (ensuring the same code will produce the same bundle when built) | ||
// See https://gitlab.com/IzzyOnDroid/repo/-/wikis/Reproducible-Builds/RB-Hints-for-Developers#no-funny-build-time-generated-ids | ||
// for more information | ||
latekvo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--build-id=none" | ||
abiFilters(*reactNativeArchitectures()) | ||
} | ||
ndkBuild { | ||
arguments "APP_LDFLAGS+=-Wl,--build-id=none" | ||
} | ||
} | ||
} | ||
|
@@ -177,11 +171,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" | ||
} | ||
} | ||
|
||
|
@@ -209,14 +201,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' | ||
} | ||
} | ||
} | ||
|
||
|
@@ -240,7 +224,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' }) { | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.