2018-02-05 11:47:10 -08:00
|
|
|
|
# coding: utf-8
|
2017-02-06 16:16:46 -08:00
|
|
|
|
require "json"
|
2016-03-29 13:23:52 -07:00
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
2017-02-27 13:25:47 -08:00
|
|
|
|
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
|
2016-03-29 13:23:52 -07:00
|
|
|
|
|
2017-05-03 14:31:35 -07:00
|
|
|
|
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
|
2018-04-13 17:19:02 -07:00
|
|
|
|
folly_version = '2016.10.31.00'
|
2017-05-03 14:31:35 -07:00
|
|
|
|
|
2015-03-26 06:32:01 -07:00
|
|
|
|
Pod::Spec.new do |s|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.name = "React"
|
2017-02-27 13:25:47 -08:00
|
|
|
|
s.version = version
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.summary = package["description"]
|
|
|
|
|
s.description = <<-DESC
|
|
|
|
|
React Native apps are built using the React JS
|
|
|
|
|
framework, and render directly to native UIKit
|
|
|
|
|
elements using a fully asynchronous architecture.
|
|
|
|
|
There is no browser and no HTML. We have picked what
|
|
|
|
|
we think is the best set of features from these and
|
|
|
|
|
other technologies to build what we hope to become
|
|
|
|
|
the best product development framework available,
|
|
|
|
|
with an emphasis on iteration speed, developer
|
|
|
|
|
delight, continuity of technology, and absolutely
|
|
|
|
|
beautiful and fast products with no compromises in
|
|
|
|
|
quality or capability.
|
|
|
|
|
DESC
|
|
|
|
|
s.homepage = "http://facebook.github.io/react-native/"
|
|
|
|
|
s.license = package["license"]
|
|
|
|
|
s.author = "Facebook"
|
2017-02-27 13:25:47 -08:00
|
|
|
|
s.source = source
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.default_subspec = "Core"
|
|
|
|
|
s.requires_arc = true
|
2017-07-18 15:03:37 -07:00
|
|
|
|
s.platforms = { :ios => "8.0", :tvos => "9.2" }
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
|
2018-02-16 18:25:02 -08:00
|
|
|
|
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.cocoapods_version = ">= 1.2.0"
|
2015-03-31 19:01:48 -07:00
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "Core" do |ss|
|
2017-08-25 04:38:52 -07:00
|
|
|
|
ss.dependency "yoga", "#{package["version"]}.React"
|
2017-11-21 10:10:30 -08:00
|
|
|
|
ss.source_files = "React/**/*.{c,h,m,mm,S,cpp}"
|
2017-07-07 02:29:23 -07:00
|
|
|
|
ss.exclude_files = "**/__tests__/*",
|
|
|
|
|
"IntegrationTests/*",
|
|
|
|
|
"React/DevSupport/*",
|
|
|
|
|
"React/Inspector/*",
|
|
|
|
|
"ReactCommon/yoga/*",
|
|
|
|
|
"React/Cxx*/*",
|
2018-04-13 17:19:04 -07:00
|
|
|
|
"React/Fabric/**/*"
|
2017-11-27 15:35:55 -08:00
|
|
|
|
ss.ios.exclude_files = "React/**/RCTTV*.*"
|
2017-07-18 15:03:37 -07:00
|
|
|
|
ss.tvos.exclude_files = "React/Modules/RCTClipboard*",
|
|
|
|
|
"React/Views/RCTDatePicker*",
|
|
|
|
|
"React/Views/RCTPicker*",
|
|
|
|
|
"React/Views/RCTRefreshControl*",
|
|
|
|
|
"React/Views/RCTSlider*",
|
|
|
|
|
"React/Views/RCTSwitch*",
|
|
|
|
|
"React/Views/RCTWebView*"
|
2017-07-07 02:29:23 -07:00
|
|
|
|
ss.header_dir = "React"
|
2017-02-06 16:16:46 -08:00
|
|
|
|
ss.framework = "JavaScriptCore"
|
|
|
|
|
ss.libraries = "stdc++"
|
2017-05-30 11:10:20 -07:00
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
2016-11-21 09:02:09 -08:00
|
|
|
|
end
|
|
|
|
|
|
2017-05-03 14:31:35 -07:00
|
|
|
|
s.subspec "CxxBridge" do |ss|
|
2018-04-13 17:19:02 -07:00
|
|
|
|
ss.dependency "Folly", folly_version
|
2017-05-03 14:31:35 -07:00
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.dependency "React/cxxreact"
|
|
|
|
|
ss.compiler_flags = folly_compiler_flags
|
|
|
|
|
ss.private_header_files = "React/Cxx*/*.h"
|
|
|
|
|
ss.source_files = "React/Cxx*/*.{h,m,mm}"
|
2018-04-12 15:54:36 -07:00
|
|
|
|
ss.exclude_files = "React/CxxExceptions/**/*"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
s.subspec "CxxExceptions" do |ss|
|
|
|
|
|
ss.dependency "React/CxxBridge"
|
2018-04-13 17:19:04 -07:00
|
|
|
|
ss.dependency "React/exceptions"
|
2018-04-12 15:54:36 -07:00
|
|
|
|
ss.source_files = "React/CxxExceptions/*.{h,m,mm}"
|
2017-05-03 14:31:35 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-27 13:25:47 -08:00
|
|
|
|
s.subspec "DevSupport" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.dependency "React/RCTWebSocket"
|
2017-07-07 02:29:23 -07:00
|
|
|
|
ss.source_files = "React/DevSupport/*",
|
|
|
|
|
"React/Inspector/*"
|
2017-02-27 13:25:47 -08:00
|
|
|
|
end
|
|
|
|
|
|
2018-04-13 17:19:04 -07:00
|
|
|
|
s.subspec "RCTFabric" do |ss|
|
|
|
|
|
ss.dependency "Folly", folly_version
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.dependency "React/CxxExceptions"
|
|
|
|
|
ss.dependency "React/fabric"
|
|
|
|
|
ss.compiler_flags = folly_compiler_flags
|
|
|
|
|
ss.source_files = "React/Fabric/**/*.{c,h,m,mm,S,cpp}"
|
|
|
|
|
ss.exclude_files = "**/tests/*"
|
|
|
|
|
ss.header_dir = "React"
|
|
|
|
|
ss.framework = "JavaScriptCore"
|
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "tvOS" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
2018-04-18 17:37:26 -07:00
|
|
|
|
ss.source_files = "React/**/RCTTV*.{h,m}"
|
2017-01-06 17:09:39 -08:00
|
|
|
|
end
|
|
|
|
|
|
2017-05-03 14:31:35 -07:00
|
|
|
|
s.subspec "jschelpers" do |ss|
|
2018-04-13 17:19:02 -07:00
|
|
|
|
ss.dependency "Folly", folly_version
|
2017-11-03 16:21:07 -07:00
|
|
|
|
ss.dependency "React/PrivateDatabase"
|
2017-05-03 14:31:35 -07:00
|
|
|
|
ss.compiler_flags = folly_compiler_flags
|
|
|
|
|
ss.source_files = "ReactCommon/jschelpers/*.{cpp,h}"
|
|
|
|
|
ss.private_header_files = "ReactCommon/jschelpers/*.h"
|
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
|
|
|
|
ss.framework = "JavaScriptCore"
|
|
|
|
|
end
|
|
|
|
|
|
2017-11-27 07:05:22 -08:00
|
|
|
|
s.subspec "jsinspector" do |ss|
|
|
|
|
|
ss.source_files = "ReactCommon/jsinspector/*.{cpp,h}"
|
|
|
|
|
ss.private_header_files = "ReactCommon/jsinspector/*.h"
|
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
|
|
|
|
end
|
|
|
|
|
|
2017-11-03 16:21:07 -07:00
|
|
|
|
s.subspec "PrivateDatabase" do |ss|
|
|
|
|
|
ss.source_files = "ReactCommon/privatedata/*.{cpp,h}"
|
|
|
|
|
ss.private_header_files = "ReactCommon/privatedata/*.h"
|
2017-11-04 12:37:19 -07:00
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
2017-11-03 16:21:07 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-05-03 14:31:35 -07:00
|
|
|
|
s.subspec "cxxreact" do |ss|
|
|
|
|
|
ss.dependency "React/jschelpers"
|
2017-11-27 07:05:22 -08:00
|
|
|
|
ss.dependency "React/jsinspector"
|
2018-01-17 19:11:48 -08:00
|
|
|
|
ss.dependency "boost-for-react-native", "1.63.0"
|
2018-04-13 17:19:02 -07:00
|
|
|
|
ss.dependency "Folly", folly_version
|
2017-05-03 14:31:35 -07:00
|
|
|
|
ss.compiler_flags = folly_compiler_flags
|
|
|
|
|
ss.source_files = "ReactCommon/cxxreact/*.{cpp,h}"
|
2017-07-26 11:05:18 -07:00
|
|
|
|
ss.exclude_files = "ReactCommon/cxxreact/SampleCxxModule.*"
|
2017-05-03 14:31:35 -07:00
|
|
|
|
ss.private_header_files = "ReactCommon/cxxreact/*.h"
|
2018-01-17 19:11:48 -08:00
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Folly\"" }
|
2017-05-03 14:31:35 -07:00
|
|
|
|
end
|
|
|
|
|
|
2018-04-13 17:19:04 -07:00
|
|
|
|
s.subspec "exceptions" do |ss|
|
|
|
|
|
ss.source_files = "ReactCommon/exceptions/*.{cpp,h}"
|
|
|
|
|
ss.header_dir = "cxxreact"
|
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
s.subspec "fabric" do |ss|
|
|
|
|
|
ss.subspec "core" do |sss|
|
|
|
|
|
sss.dependency "Folly", folly_version
|
|
|
|
|
sss.compiler_flags = folly_compiler_flags
|
|
|
|
|
sss.source_files = "ReactCommon/fabric/core/**/*.{cpp,h}"
|
|
|
|
|
sss.exclude_files = "**/tests/*"
|
|
|
|
|
sss.header_dir = "fabric/core"
|
|
|
|
|
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
ss.subspec "debug" do |sss|
|
|
|
|
|
sss.dependency "Folly", folly_version
|
|
|
|
|
sss.compiler_flags = folly_compiler_flags
|
|
|
|
|
sss.source_files = "ReactCommon/fabric/debug/**/*.{cpp,h}"
|
|
|
|
|
sss.exclude_files = "**/tests/*"
|
|
|
|
|
sss.header_dir = "fabric/debug"
|
|
|
|
|
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
ss.subspec "graphics" do |sss|
|
|
|
|
|
sss.dependency "Folly", folly_version
|
|
|
|
|
sss.compiler_flags = folly_compiler_flags
|
|
|
|
|
sss.source_files = "ReactCommon/fabric/graphics/**/*.{cpp,h}"
|
|
|
|
|
sss.exclude_files = "**/tests/*"
|
|
|
|
|
sss.header_dir = "fabric/graphics"
|
|
|
|
|
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
ss.subspec "uimanager" do |sss|
|
|
|
|
|
sss.dependency "Folly", folly_version
|
|
|
|
|
sss.compiler_flags = folly_compiler_flags
|
|
|
|
|
sss.source_files = "ReactCommon/fabric/uimanager/**/*.{cpp,h}"
|
|
|
|
|
sss.exclude_files = "**/tests/*"
|
|
|
|
|
sss.header_dir = "fabric/uimanager"
|
|
|
|
|
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
ss.subspec "view" do |sss|
|
|
|
|
|
sss.dependency "Folly", folly_version
|
|
|
|
|
sss.dependency "yoga"
|
|
|
|
|
sss.compiler_flags = folly_compiler_flags
|
|
|
|
|
sss.source_files = "ReactCommon/fabric/view/**/*.{cpp,h}"
|
|
|
|
|
sss.exclude_files = "**/tests/*"
|
|
|
|
|
sss.header_dir = "fabric/view"
|
|
|
|
|
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "ART" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/ART/**/*.{h,m}"
|
2015-03-31 19:01:48 -07:00
|
|
|
|
end
|
2015-03-26 06:32:01 -07:00
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTActionSheet" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
|
2015-05-13 10:07:59 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTAnimation" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/NativeAnimation/{Drivers/*,Nodes/*,*}.{h,m}"
|
2017-05-09 11:01:03 -07:00
|
|
|
|
ss.header_dir = "RCTAnimation"
|
2015-03-26 06:32:01 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-07-26 08:12:12 -07:00
|
|
|
|
s.subspec "RCTBlob" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
2018-01-26 09:06:14 -08:00
|
|
|
|
ss.source_files = "Libraries/Blob/*.{h,m,mm}"
|
2017-07-26 08:12:12 -07:00
|
|
|
|
ss.preserve_paths = "Libraries/Blob/*.js"
|
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTCameraRoll" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
2017-07-26 08:12:12 -07:00
|
|
|
|
ss.dependency 'React/RCTImage'
|
2017-02-06 16:16:46 -08:00
|
|
|
|
ss.source_files = "Libraries/CameraRoll/*.{h,m}"
|
2016-06-30 01:40:57 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTGeolocation" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/Geolocation/*.{h,m}"
|
2015-11-19 01:26:58 -08:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTImage" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.dependency "React/RCTNetwork"
|
|
|
|
|
ss.source_files = "Libraries/Image/*.{h,m}"
|
2015-03-26 06:32:01 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTNetwork" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/Network/*.{h,m,mm}"
|
2015-03-26 06:32:01 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTPushNotification" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/PushNotificationIOS/*.{h,m}"
|
2015-03-26 06:32:01 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTSettings" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/Settings/*.{h,m}"
|
2015-03-26 06:32:01 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTText" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
2018-01-18 13:02:57 -08:00
|
|
|
|
ss.source_files = "Libraries/Text/**/*.{h,m}"
|
2015-03-26 06:32:01 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTVibration" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/Vibration/*.{h,m}"
|
2015-03-26 06:32:01 -07:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTWebSocket" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
2017-07-26 08:12:12 -07:00
|
|
|
|
ss.dependency "React/RCTBlob"
|
2017-08-08 08:10:51 -07:00
|
|
|
|
ss.dependency "React/fishhook"
|
2017-02-06 16:16:46 -08:00
|
|
|
|
ss.source_files = "Libraries/WebSocket/*.{h,m}"
|
2015-03-26 06:32:01 -07:00
|
|
|
|
end
|
2015-05-14 04:07:07 -07:00
|
|
|
|
|
2017-08-08 08:10:51 -07:00
|
|
|
|
s.subspec "fishhook" do |ss|
|
2017-10-03 18:12:39 -07:00
|
|
|
|
ss.header_dir = "fishhook"
|
2017-08-08 08:10:51 -07:00
|
|
|
|
ss.source_files = "Libraries/fishhook/*.{h,c}"
|
|
|
|
|
end
|
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTLinkingIOS" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/LinkingIOS/*.{h,m}"
|
2015-05-14 04:07:07 -07:00
|
|
|
|
end
|
2015-06-11 10:46:57 -07:00
|
|
|
|
|
2017-02-06 16:16:46 -08:00
|
|
|
|
s.subspec "RCTTest" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/RCTTest/**/*.{h,m}"
|
|
|
|
|
ss.frameworks = "XCTest"
|
2015-10-13 07:38:11 -07:00
|
|
|
|
end
|
2017-07-07 02:29:23 -07:00
|
|
|
|
|
|
|
|
|
s.subspec "_ignore_me_subspec_for_linting_" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.dependency "React/CxxBridge"
|
|
|
|
|
end
|
2015-03-26 06:32:01 -07:00
|
|
|
|
end
|