mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
TM iOS: Set up CocoaPods specs for the TM specs
Summary: This defines various sub specs to support building TurboModules that implement the codegen'ed specs. Reviewed By: PeteTheHeat Differential Revision: D16043221 fbshipit-source-id: 27ed532be929c11c8fe648632da8a72061cbc8b0
This commit is contained in:
committed by
Facebook Github Bot
parent
020c11cc7b
commit
fde8a4cf93
@@ -0,0 +1,31 @@
|
||||
# coding: utf-8
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
require "json"
|
||||
|
||||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
|
||||
version = package['version']
|
||||
|
||||
source = { :git => 'https://github.com/facebook/react-native.git' }
|
||||
if version == '1000.0.0'
|
||||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
||||
source[:commit] = `git rev-parse HEAD`.strip
|
||||
else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "FBLazyVector"
|
||||
s.version = version
|
||||
s.summary = "-" # TODO
|
||||
s.homepage = "http://facebook.github.io/react-native/"
|
||||
s.license = package["license"]
|
||||
s.author = "Facebook, Inc. and its affiliates"
|
||||
s.platforms = { :ios => "9.0", :tvos => "9.2" }
|
||||
s.source = source
|
||||
s.source_files = "**/*.{c,h,m,mm,cpp}"
|
||||
s.header_dir = "FBLazyVector"
|
||||
end
|
||||
@@ -0,0 +1,47 @@
|
||||
# coding: utf-8
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
require "json"
|
||||
|
||||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
|
||||
version = package['version']
|
||||
|
||||
source = { :git => 'https://github.com/facebook/react-native.git' }
|
||||
if version == '1000.0.0'
|
||||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
||||
source[:commit] = `git rev-parse HEAD`.strip
|
||||
else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2018.10.22.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "FBReactNativeSpec"
|
||||
s.version = version
|
||||
s.summary = "-" # TODO
|
||||
s.homepage = "http://facebook.github.io/react-native/"
|
||||
s.license = package["license"]
|
||||
s.author = "Facebook, Inc. and its affiliates"
|
||||
s.platforms = { :ios => "9.0", :tvos => "9.2" }
|
||||
s.compiler_flags = folly_compiler_flags
|
||||
s.source = source
|
||||
s.source_files = "**/*.{c,h,m,mm,cpp}"
|
||||
s.header_dir = "FBReactNativeSpec"
|
||||
|
||||
s.pod_target_xcconfig = {
|
||||
"USE_HEADERMAP" => "YES",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
|
||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/Libraries/FBReactNativeSpec\" \"$(PODS_ROOT)/Folly\""
|
||||
}
|
||||
|
||||
s.dependency "Folly", folly_version
|
||||
s.dependency "RCTRequired", version
|
||||
s.dependency "React-Core", version
|
||||
s.dependency "React-TypeSafety", version
|
||||
s.dependency "React-turbomodule-core", version
|
||||
end
|
||||
@@ -0,0 +1,31 @@
|
||||
# coding: utf-8
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
require "json"
|
||||
|
||||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
|
||||
version = package['version']
|
||||
|
||||
source = { :git => 'https://github.com/facebook/react-native.git' }
|
||||
if version == '1000.0.0'
|
||||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
||||
source[:commit] = `git rev-parse HEAD`.strip
|
||||
else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "RCTRequired"
|
||||
s.version = version
|
||||
s.summary = "-" # TODO
|
||||
s.homepage = "http://facebook.github.io/react-native/"
|
||||
s.license = package["license"]
|
||||
s.author = "Facebook, Inc. and its affiliates"
|
||||
s.platforms = { :ios => "9.0", :tvos => "9.2" }
|
||||
s.source = source
|
||||
s.source_files = "**/*.{c,h,m,mm,cpp}"
|
||||
s.header_dir = "RCTRequired"
|
||||
end
|
||||
@@ -0,0 +1,45 @@
|
||||
# coding: utf-8
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
require "json"
|
||||
|
||||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
|
||||
version = package['version']
|
||||
|
||||
source = { :git => 'https://github.com/facebook/react-native.git' }
|
||||
if version == '1000.0.0'
|
||||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
||||
source[:commit] = `git rev-parse HEAD`.strip
|
||||
else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2018.10.22.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-TypeSafety"
|
||||
s.version = version
|
||||
s.summary = "-" # TODO
|
||||
s.homepage = "http://facebook.github.io/react-native/"
|
||||
s.license = package["license"]
|
||||
s.author = "Facebook, Inc. and its affiliates"
|
||||
s.platforms = { :ios => "9.0", :tvos => "9.2" }
|
||||
s.compiler_flags = folly_compiler_flags
|
||||
s.source = source
|
||||
s.source_files = "**/*.{c,h,m,mm,cpp}"
|
||||
s.header_dir = "React"
|
||||
s.pod_target_xcconfig = {
|
||||
"USE_HEADERMAP" => "YES",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
|
||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/Libraries/TypeSafety\" \"$(PODS_ROOT)/Folly\""
|
||||
}
|
||||
|
||||
s.dependency "FBLazyVector", version
|
||||
s.dependency "Folly", folly_version
|
||||
s.dependency "RCTRequired", version
|
||||
s.dependency "React-Core", version
|
||||
end
|
||||
+38
-1
@@ -1,6 +1,13 @@
|
||||
PODS:
|
||||
- boost-for-react-native (1.63.0)
|
||||
- DoubleConversion (1.1.6)
|
||||
- FBLazyVector (1000.0.0)
|
||||
- FBReactNativeSpec (1000.0.0):
|
||||
- Folly (= 2018.10.22.00)
|
||||
- RCTRequired (= 1000.0.0)
|
||||
- React-Core (= 1000.0.0)
|
||||
- React-turbomodule-core (= 1000.0.0)
|
||||
- React-TypeSafety (= 1000.0.0)
|
||||
- Folly (2018.10.22.00):
|
||||
- boost-for-react-native
|
||||
- DoubleConversion
|
||||
@@ -11,6 +18,7 @@ PODS:
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- glog (0.3.5)
|
||||
- RCTRequired (1000.0.0)
|
||||
- React (1000.0.0):
|
||||
- React-Core (= 1000.0.0)
|
||||
- React-DevSupport (= 1000.0.0)
|
||||
@@ -31,6 +39,10 @@ PODS:
|
||||
- React-cxxreact (= 1000.0.0)
|
||||
- React-jsiexecutor (= 1000.0.0)
|
||||
- yoga (= 1000.0.0.React)
|
||||
- React-CoreModules (1000.0.0):
|
||||
- FBReactNativeSpec (= 1000.0.0)
|
||||
- Folly (= 2018.10.22.00)
|
||||
- React-Core (= 1000.0.0)
|
||||
- React-cxxreact (1000.0.0):
|
||||
- boost-for-react-native (= 1.63.0)
|
||||
- DoubleConversion
|
||||
@@ -114,15 +126,24 @@ PODS:
|
||||
- React-cxxreact (= 1000.0.0)
|
||||
- React-jsi (= 1000.0.0)
|
||||
- React-turbomodule-core (= 1000.0.0)
|
||||
- React-TypeSafety (1000.0.0):
|
||||
- FBLazyVector (= 1000.0.0)
|
||||
- Folly (= 2018.10.22.00)
|
||||
- RCTRequired (= 1000.0.0)
|
||||
- React-Core (= 1000.0.0)
|
||||
- yoga (1000.0.0.React)
|
||||
|
||||
DEPENDENCIES:
|
||||
- DoubleConversion (from `../third-party-podspecs/DoubleConversion.podspec`)
|
||||
- FBLazyVector (from `../Libraries/FBLazyVector`)
|
||||
- FBReactNativeSpec (from `../Libraries/FBReactNativeSpec`)
|
||||
- Folly (from `../third-party-podspecs/Folly.podspec`)
|
||||
- glog (from `../third-party-podspecs/glog.podspec`)
|
||||
- RCTRequired (from `../Libraries/RCTRequired`)
|
||||
- React (from `../`)
|
||||
- React-ART (from `../Libraries/ART`)
|
||||
- React-Core (from `../React`)
|
||||
- React-CoreModules (from `../React/CoreModules`)
|
||||
- React-cxxreact (from `../ReactCommon/cxxreact`)
|
||||
- React-DevSupport (from `../React`)
|
||||
- React-jscallinvoker (from `../ReactCommon/jscallinvoker`)
|
||||
@@ -143,6 +164,7 @@ DEPENDENCIES:
|
||||
- React-RCTWebSocket (from `../Libraries/WebSocket`)
|
||||
- React-turbomodule-core (from `../ReactCommon/turbomodule/core`)
|
||||
- React-turbomodule-samples (from `../ReactCommon/turbomodule/samples`)
|
||||
- React-TypeSafety (from `../Libraries/TypeSafety`)
|
||||
- yoga (from `../ReactCommon/yoga`)
|
||||
|
||||
SPEC REPOS:
|
||||
@@ -152,16 +174,24 @@ SPEC REPOS:
|
||||
EXTERNAL SOURCES:
|
||||
DoubleConversion:
|
||||
:podspec: "../third-party-podspecs/DoubleConversion.podspec"
|
||||
FBLazyVector:
|
||||
:path: "../Libraries/FBLazyVector"
|
||||
FBReactNativeSpec:
|
||||
:path: "../Libraries/FBReactNativeSpec"
|
||||
Folly:
|
||||
:podspec: "../third-party-podspecs/Folly.podspec"
|
||||
glog:
|
||||
:podspec: "../third-party-podspecs/glog.podspec"
|
||||
RCTRequired:
|
||||
:path: "../Libraries/RCTRequired"
|
||||
React:
|
||||
:path: "../"
|
||||
React-ART:
|
||||
:path: "../Libraries/ART"
|
||||
React-Core:
|
||||
:path: "../React"
|
||||
React-CoreModules:
|
||||
:path: "../React/CoreModules"
|
||||
React-cxxreact:
|
||||
:path: "../ReactCommon/cxxreact"
|
||||
React-DevSupport:
|
||||
@@ -202,17 +232,23 @@ EXTERNAL SOURCES:
|
||||
:path: "../ReactCommon/turbomodule/core"
|
||||
React-turbomodule-samples:
|
||||
:path: "../ReactCommon/turbomodule/samples"
|
||||
React-TypeSafety:
|
||||
:path: "../Libraries/TypeSafety"
|
||||
yoga:
|
||||
:path: "../ReactCommon/yoga"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
||||
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
|
||||
FBLazyVector: 34431b7e61740bed29b082ff81500b0ffafaffa0
|
||||
FBReactNativeSpec: 82b0e4bdc0cb0b1b6990b5bbbc85b4b161a6a276
|
||||
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
|
||||
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
|
||||
RCTRequired: 33f3b89d2d82ef01c02b9b4f8146c43762e509d8
|
||||
React: 7c652b87c228731c51ab5764de68b6c17e6342be
|
||||
React-ART: 28f8815acbbc4816cec14866b59911a83eb780ed
|
||||
React-Core: 85bf24f380e5228013f5f75d7c1b6338a003a2b2
|
||||
React-Core: 26b00da6b066d0d426a558d13c76240038aa7dc5
|
||||
React-CoreModules: 04ea22808b22232b251d462f3309ab1150e3b7dd
|
||||
React-cxxreact: 7e670bad16eb78fa889573d931c12bb1003a3598
|
||||
React-DevSupport: f34768e3aad3e59ee9800c752a78bc6cb24d0f75
|
||||
React-jscallinvoker: a477dfe11b3ebe31ee9575057ebfb57a963db636
|
||||
@@ -233,6 +269,7 @@ SPEC CHECKSUMS:
|
||||
React-RCTWebSocket: cb5317e9a4adc37191660f819fb21d63433584ef
|
||||
React-turbomodule-core: 0a6e91fe8e28bbf119fe31132ecb27a4f42ea551
|
||||
React-turbomodule-samples: b28927d482d6fcfc3cbe2fd25f304799d2ff9bb7
|
||||
React-TypeSafety: 1de5a1034398108f4ca866b68489734f8dbb4c44
|
||||
yoga: 542cb34fe3bca476487e08eb516dd640ea996a65
|
||||
|
||||
PODFILE CHECKSUM: bdc86d3bfde60c2637cfa8c4ed81afeaa2aaf6a3
|
||||
|
||||
@@ -132,17 +132,22 @@
|
||||
|
||||
#ifdef RN_TURBO_MODULE_ENABLED
|
||||
|
||||
- (Class)getModuleClassFromName:(const char *)name
|
||||
{
|
||||
return facebook::react::RNTesterTurboModuleClassProvider(name);
|
||||
}
|
||||
|
||||
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
|
||||
jsInvoker:(std::shared_ptr<facebook::react::JSCallInvoker>)jsInvoker
|
||||
{
|
||||
return RNTesterTurboModuleProvider(name, jsInvoker);
|
||||
return facebook::react::RNTesterTurboModuleProvider(name, jsInvoker);
|
||||
}
|
||||
|
||||
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
|
||||
instance:(id<RCTTurboModule>)instance
|
||||
jsInvoker:(std::shared_ptr<facebook::react::JSCallInvoker>)jsInvoker
|
||||
{
|
||||
return RNTesterTurboModuleProvider(name, instance, jsInvoker);
|
||||
return facebook::react::RNTesterTurboModuleProvider(name, instance, jsInvoker);
|
||||
}
|
||||
|
||||
- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
/**
|
||||
* Provide the TurboModule class for the given name.
|
||||
*/
|
||||
Class RNTesterTurboModuleClassProvider(const char *name);
|
||||
|
||||
/**
|
||||
* Provide a pure C++ instance of a TurboModule, specific to this app.
|
||||
*/
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
Class RNTesterTurboModuleClassProvider(const char *name) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
std::shared_ptr<TurboModule> RNTesterTurboModuleProvider(const std::string &name, std::shared_ptr<JSCallInvoker> jsInvoker) {
|
||||
if (name == "SampleTurboCxxModule") {
|
||||
return std::make_shared<SampleTurboCxxModule>(jsInvoker);
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# coding: utf-8
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
require "json"
|
||||
|
||||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
|
||||
version = package['version']
|
||||
|
||||
source = { :git => 'https://github.com/facebook/react-native.git' }
|
||||
if version == '1000.0.0'
|
||||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
||||
source[:commit] = `git rev-parse HEAD`.strip
|
||||
else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2018.10.22.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-CoreModules"
|
||||
s.version = version
|
||||
s.summary = "-" # TODO
|
||||
s.homepage = "http://facebook.github.io/react-native/"
|
||||
s.license = package["license"]
|
||||
s.author = "Facebook, Inc. and its affiliates"
|
||||
s.platforms = { :ios => "9.0", :tvos => "9.2" }
|
||||
s.compiler_flags = folly_compiler_flags
|
||||
s.source = source
|
||||
s.source_files = "**/*.{c,h,m,mm,cpp}"
|
||||
s.header_dir = "React"
|
||||
s.pod_target_xcconfig = {
|
||||
"USE_HEADERMAP" => "YES",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
|
||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/React/CoreModules\" \"$(PODS_ROOT)/Folly\""
|
||||
}
|
||||
|
||||
s.dependency "FBReactNativeSpec", version
|
||||
s.dependency "Folly", folly_version
|
||||
s.dependency "React-Core", version
|
||||
end
|
||||
@@ -31,7 +31,8 @@ Pod::Spec.new do |s|
|
||||
s.platforms = { :ios => "9.0", :tvos => "9.2" }
|
||||
s.source = source
|
||||
s.source_files = "**/*.{c,h,m,mm,S,cpp}"
|
||||
s.exclude_files = "DevSupport/**/*",
|
||||
s.exclude_files = "CoreModules/**/*",
|
||||
"DevSupport/**/*",
|
||||
"Fabric/**/*",
|
||||
"Inspector/**/*"
|
||||
s.ios.exclude_files = "**/RCTTV*.*"
|
||||
|
||||
@@ -2,10 +2,10 @@ def use_react_native! (options={})
|
||||
|
||||
# The prefix to the react-native
|
||||
prefix = options[:path] ||= "../node_modules/react-native"
|
||||
|
||||
|
||||
# Include Fabric dependencies
|
||||
fabric_enabled = options[:fabric_enabled] ||= false
|
||||
|
||||
|
||||
# Include Turbo Modules dependencies
|
||||
turbo_modules_enabled = options[:turbo_modules_enabled] ||= false
|
||||
|
||||
@@ -13,8 +13,12 @@ def use_react_native! (options={})
|
||||
production = options[:production] ||= false
|
||||
|
||||
# The Pods which should be included in all projects
|
||||
pod 'FBLazyVector', :path => "#{prefix}/Libraries/FBLazyVector"
|
||||
pod 'FBReactNativeSpec', :path => "#{prefix}/Libraries/FBReactNativeSpec"
|
||||
pod 'RCTRequired', :path => "#{prefix}/Libraries/RCTRequired"
|
||||
pod 'React', :path => "#{prefix}/"
|
||||
pod 'React-Core', :path => "#{prefix}/React"
|
||||
pod 'React-CoreModules', :path => "#{prefix}/React/CoreModules"
|
||||
pod 'React-RCTActionSheet', :path => "#{prefix}/Libraries/ActionSheetIOS"
|
||||
pod 'React-RCTAnimation', :path => "#{prefix}/Libraries/NativeAnimation"
|
||||
pod 'React-RCTBlob', :path => "#{prefix}/Libraries/Blob"
|
||||
@@ -25,6 +29,7 @@ def use_react_native! (options={})
|
||||
pod 'React-RCTText', :path => "#{prefix}/Libraries/Text"
|
||||
pod 'React-RCTVibration', :path => "#{prefix}/Libraries/Vibration"
|
||||
pod 'React-RCTWebSocket', :path => "#{prefix}/Libraries/WebSocket"
|
||||
pod 'React-TypeSafety', :path => "#{prefix}/Libraries/TypeSafety"
|
||||
|
||||
unless production
|
||||
pod 'React-DevSupport', :path => "#{prefix}/React"
|
||||
@@ -35,6 +40,7 @@ def use_react_native! (options={})
|
||||
pod 'React-jsi', :path => "#{prefix}/ReactCommon/jsi"
|
||||
pod 'React-jsiexecutor', :path => "#{prefix}/ReactCommon/jsiexecutor"
|
||||
pod 'React-jsinspector', :path => "#{prefix}/ReactCommon/jsinspector"
|
||||
pod 'React-turbomodule-core', :path => "#{prefix}/ReactCommon/turbomodule/core"
|
||||
pod 'yoga', :path => "#{prefix}/ReactCommon/yoga"
|
||||
|
||||
pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec"
|
||||
@@ -48,8 +54,5 @@ def use_react_native! (options={})
|
||||
pod 'React-RCTFabric', :path => "#{prefix}/React"
|
||||
pod 'Folly/Fabric', :podspec => "#{prefix}/third-party-podspecs/Folly.podspec"
|
||||
end
|
||||
|
||||
if turbo_modules_enabled
|
||||
pod 'React-turbomodule-core', :path => "#{prefix}/ReactCommon/turbomodule/core"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -72,4 +72,4 @@ Pod::Spec.new do |spec|
|
||||
|
||||
# Pinning to the same version as React.podspec.
|
||||
spec.platforms = { :ios => "9.0", :tvos => "9.2" }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user