2019-04-23 15:44:07 +03:00
|
|
|
def use_react_native! (options={})
|
|
|
|
|
|
|
|
# The prefix to the react-native
|
|
|
|
prefix = options[:path] ||= "../node_modules/react-native"
|
2019-07-02 01:12:56 +03:00
|
|
|
|
2019-05-16 07:55:26 +03:00
|
|
|
# Include Fabric dependencies
|
|
|
|
fabric_enabled = options[:fabric_enabled] ||= false
|
2019-07-02 01:12:56 +03:00
|
|
|
|
2019-05-16 07:55:26 +03:00
|
|
|
# Include Turbo Modules dependencies
|
2019-05-16 12:45:34 +03:00
|
|
|
turbo_modules_enabled = options[:turbo_modules_enabled] ||= false
|
2019-04-23 15:44:07 +03:00
|
|
|
|
|
|
|
# Include DevSupport dependency
|
|
|
|
production = options[:production] ||= false
|
|
|
|
|
|
|
|
# The Pods which should be included in all projects
|
2019-07-02 01:12:56 +03:00
|
|
|
pod 'FBLazyVector', :path => "#{prefix}/Libraries/FBLazyVector"
|
|
|
|
pod 'FBReactNativeSpec', :path => "#{prefix}/Libraries/FBReactNativeSpec"
|
|
|
|
pod 'RCTRequired', :path => "#{prefix}/Libraries/RCTRequired"
|
2019-04-23 15:44:07 +03:00
|
|
|
pod 'React', :path => "#{prefix}/"
|
|
|
|
pod 'React-Core', :path => "#{prefix}/React"
|
2019-07-02 01:12:56 +03:00
|
|
|
pod 'React-CoreModules', :path => "#{prefix}/React/CoreModules"
|
2019-04-23 15:44:07 +03:00
|
|
|
pod 'React-RCTActionSheet', :path => "#{prefix}/Libraries/ActionSheetIOS"
|
|
|
|
pod 'React-RCTAnimation', :path => "#{prefix}/Libraries/NativeAnimation"
|
|
|
|
pod 'React-RCTBlob', :path => "#{prefix}/Libraries/Blob"
|
|
|
|
pod 'React-RCTImage', :path => "#{prefix}/Libraries/Image"
|
|
|
|
pod 'React-RCTLinking', :path => "#{prefix}/Libraries/LinkingIOS"
|
|
|
|
pod 'React-RCTNetwork', :path => "#{prefix}/Libraries/Network"
|
|
|
|
pod 'React-RCTSettings', :path => "#{prefix}/Libraries/Settings"
|
|
|
|
pod 'React-RCTText', :path => "#{prefix}/Libraries/Text"
|
|
|
|
pod 'React-RCTVibration', :path => "#{prefix}/Libraries/Vibration"
|
|
|
|
pod 'React-RCTWebSocket', :path => "#{prefix}/Libraries/WebSocket"
|
2019-07-02 01:12:56 +03:00
|
|
|
pod 'React-TypeSafety', :path => "#{prefix}/Libraries/TypeSafety"
|
2019-05-03 23:25:56 +03:00
|
|
|
|
2019-04-23 15:44:07 +03:00
|
|
|
unless production
|
|
|
|
pod 'React-DevSupport', :path => "#{prefix}/React"
|
|
|
|
end
|
|
|
|
|
|
|
|
pod 'React-cxxreact', :path => "#{prefix}/ReactCommon/cxxreact"
|
2019-05-03 23:25:56 +03:00
|
|
|
pod 'React-jscallinvoker', :path => "#{prefix}/ReactCommon/jscallinvoker"
|
2019-04-23 15:44:07 +03:00
|
|
|
pod 'React-jsi', :path => "#{prefix}/ReactCommon/jsi"
|
|
|
|
pod 'React-jsiexecutor', :path => "#{prefix}/ReactCommon/jsiexecutor"
|
|
|
|
pod 'React-jsinspector', :path => "#{prefix}/ReactCommon/jsinspector"
|
2019-07-02 01:12:56 +03:00
|
|
|
pod 'React-turbomodule-core', :path => "#{prefix}/ReactCommon/turbomodule/core"
|
2019-04-23 15:44:07 +03:00
|
|
|
pod 'yoga', :path => "#{prefix}/ReactCommon/yoga"
|
|
|
|
|
|
|
|
pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec"
|
|
|
|
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec"
|
|
|
|
pod 'Folly', :podspec => "#{prefix}/third-party-podspecs/Folly.podspec"
|
2019-05-16 07:55:26 +03:00
|
|
|
|
|
|
|
if fabric_enabled
|
|
|
|
pod 'React-Fabric', :path => "#{prefix}/ReactCommon"
|
|
|
|
pod 'React-graphics', :path => "#{prefix}/ReactCommon/fabric/graphics"
|
|
|
|
pod 'React-jsi/Fabric', :path => "#{prefix}/ReactCommon/jsi"
|
|
|
|
pod 'React-RCTFabric', :path => "#{prefix}/React"
|
|
|
|
pod 'Folly/Fabric', :podspec => "#{prefix}/third-party-podspecs/Folly.podspec"
|
|
|
|
end
|
2019-07-02 01:12:56 +03:00
|
|
|
|
2019-04-23 15:44:07 +03:00
|
|
|
end
|