Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ dependencies {
}

if (project.ext.react.enableFlipper) {
logger.warn("\nFlipper is deprecated and is removed from react-native in 0.74")
logger.warn("\nFlipper will be removed from react-native-test-app in 3.0")
def flipperVersion = project.ext.react.enableFlipper
debugImplementation("com.facebook.flipper:flipper:${flipperVersion}") {
exclude(group: "com.facebook.fbjni")
Expand Down
9 changes: 9 additions & 0 deletions ios/use_react_native-0.64.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# rubocop:disable Metrics/CyclomaticComplexity

require 'open3'

def include_react_native!(options)
Expand All @@ -7,6 +9,11 @@ def include_react_native!(options)

require_relative(File.join(project_root, react_native, 'scripts', 'react_native_pods'))

if target_platform == :ios && flipper_versions
Pod::UI.warn('Flipper is deprecated and is removed from react-native in 0.74')
Pod::UI.warn('Flipper will be removed from react-native-test-app in 3.0')
end

use_flipper!(flipper_versions) if target_platform == :ios && flipper_versions
use_react_native!(options)

Expand All @@ -30,3 +37,5 @@ def include_react_native!(options)
end
}
end

# rubocop:enable Metrics/CyclomaticComplexity
5 changes: 5 additions & 0 deletions ios/use_react_native-0.68.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ def include_react_native!(options)

require_relative(File.join(project_root, react_native, 'scripts', 'react_native_pods'))

if target_platform == :ios && flipper_versions
Pod::UI.warn('Flipper is deprecated and is removed from react-native in 0.74')
Pod::UI.warn('Flipper will be removed from react-native-test-app in 3.0')
end

use_new_architecture!(options)
use_flipper!(flipper_versions) if target_platform == :ios && flipper_versions
use_react_native!(options)
Expand Down
46 changes: 29 additions & 17 deletions ios/use_react_native-0.70.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,38 @@ def include_react_native!(options)

require_relative(File.join(project_root, react_native, 'scripts', 'react_native_pods'))

if target_platform == :ios && flipper_versions
Pod::UI.warn(
'use_flipper is deprecated from 0.70; use the flipper_configuration ' \
'option in the use_test_app! function instead if you don\'t need to ' \
'support older versions of react-native.'
)
options[:flipper_configuration] = FlipperConfiguration.enabled(['Debug'], flipper_versions)
if target_platform == :ios && (flipper_versions || options.key?(:flipper_configuration))
Pod::UI.warn('Flipper is deprecated and is removed from react-native in 0.74')
Pod::UI.warn('Flipper will be removed from react-native-test-app in 3.0')
if flipper_versions && defined?(FlipperConfiguration)
options[:flipper_configuration] = FlipperConfiguration.enabled(['Debug'], flipper_versions)
end
end

use_new_architecture!(options)
use_react_native!(
path: react_native,
fabric_enabled: options[:fabric_enabled] == true,
new_arch_enabled: options[:new_arch_enabled] == true,
production: options.key?(:production) ? options[:production] : ENV['PRODUCTION'] == '1',
hermes_enabled: options[:hermes_enabled] == true,
flipper_configuration: options[:flipper_configuration] || FlipperConfiguration.disabled,
app_path: options[:app_path] || '..',
config_file_dir: options[:config_file_dir] || ''
)
if defined?(FlipperConfiguration)
# TODO: Remove this branch in 3.0
use_react_native!(
path: react_native,
fabric_enabled: options[:fabric_enabled] == true,
new_arch_enabled: options[:new_arch_enabled] == true,
production: options.key?(:production) ? options[:production] : ENV['PRODUCTION'] == '1',
hermes_enabled: options[:hermes_enabled] == true,
flipper_configuration: options[:flipper_configuration] || FlipperConfiguration.disabled,
app_path: options[:app_path] || '..',
config_file_dir: options[:config_file_dir] || ''
)
else
use_react_native!(
path: react_native,
fabric_enabled: options[:fabric_enabled] == true,
new_arch_enabled: options[:new_arch_enabled] == true,
production: options.key?(:production) ? options[:production] : ENV['PRODUCTION'] == '1',
hermes_enabled: options[:hermes_enabled] == true,
app_path: options[:app_path] || '..',
config_file_dir: options[:config_file_dir] || ''
)
end

# If we're using react-native@main, we'll also need to prepare
# `react-native-codegen`.
Expand Down