2017-02-07 00:16:46 +00:00
|
|
|
|
require "json"
|
2016-03-29 20:23:52 +00:00
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
2017-02-27 21:25:47 +00: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 20:23:52 +00:00
|
|
|
|
|
2017-05-03 21:31:35 +00:00
|
|
|
|
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
|
|
|
|
|
|
2015-03-26 13:32:01 +00:00
|
|
|
|
Pod::Spec.new do |s|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.name = "React"
|
2017-02-27 21:25:47 +00:00
|
|
|
|
s.version = version
|
2017-02-07 00:16:46 +00: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 21:25:47 +00:00
|
|
|
|
s.source = source
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.default_subspec = "Core"
|
|
|
|
|
s.requires_arc = true
|
2017-07-18 22:03:37 +00:00
|
|
|
|
s.platforms = { :ios => "8.0", :tvos => "9.2" }
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
|
2017-05-30 18:10:20 +00:00
|
|
|
|
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs", "PATENTS"
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.cocoapods_version = ">= 1.2.0"
|
2015-04-01 02:01:48 +00:00
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "Core" do |ss|
|
2017-08-25 11:38:52 +00:00
|
|
|
|
ss.dependency "yoga", "#{package["version"]}.React"
|
2017-02-07 00:16:46 +00:00
|
|
|
|
ss.source_files = "React/**/*.{c,h,m,mm,S}"
|
2017-07-07 09:29:23 +00:00
|
|
|
|
ss.exclude_files = "**/__tests__/*",
|
|
|
|
|
"IntegrationTests/*",
|
|
|
|
|
"React/DevSupport/*",
|
|
|
|
|
"React/Inspector/*",
|
|
|
|
|
"ReactCommon/yoga/*",
|
|
|
|
|
"React/Cxx*/*",
|
|
|
|
|
"React/Base/RCTBatchedBridge.mm",
|
|
|
|
|
"React/Executors/*"
|
2017-07-18 22:03:37 +00:00
|
|
|
|
ss.ios.exclude_files = "React/**/RCTTVView.*"
|
|
|
|
|
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 09:29:23 +00:00
|
|
|
|
ss.header_dir = "React"
|
2017-02-07 00:16:46 +00:00
|
|
|
|
ss.framework = "JavaScriptCore"
|
|
|
|
|
ss.libraries = "stdc++"
|
2017-05-30 18:10:20 +00:00
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
2016-11-21 17:02:09 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-05-03 21:31:35 +00:00
|
|
|
|
s.subspec "BatchedBridge" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.dependency "React/cxxreact_legacy"
|
|
|
|
|
ss.source_files = "React/Base/RCTBatchedBridge.mm", "React/Executors/*"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
s.subspec "CxxBridge" do |ss|
|
2017-05-30 18:10:20 +00:00
|
|
|
|
ss.dependency "Folly", "2016.09.26.00"
|
2017-05-03 21:31:35 +00: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}"
|
|
|
|
|
end
|
|
|
|
|
|
2017-02-27 21:25:47 +00:00
|
|
|
|
s.subspec "DevSupport" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.dependency "React/RCTWebSocket"
|
2017-07-07 09:29:23 +00:00
|
|
|
|
ss.source_files = "React/DevSupport/*",
|
|
|
|
|
"React/Inspector/*"
|
2017-02-27 21:25:47 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "tvOS" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "React/**/RCTTVView.{h, m}"
|
2017-01-07 01:09:39 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-05-03 21:31:35 +00:00
|
|
|
|
s.subspec "jschelpers_legacy" do |ss|
|
2017-07-12 23:22:20 +00:00
|
|
|
|
ss.source_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper,InspectorInterfaces}.{cpp,h}", "ReactCommon/jschelpers/systemJSCWrapper.cpp"
|
|
|
|
|
ss.private_header_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper,InspectorInterfaces}.h"
|
2017-03-18 19:21:50 +00:00
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
2017-02-07 00:16:46 +00:00
|
|
|
|
ss.framework = "JavaScriptCore"
|
2016-11-23 19:33:44 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-05-03 21:31:35 +00:00
|
|
|
|
s.subspec "cxxreact_legacy" do |ss|
|
|
|
|
|
ss.dependency "React/jschelpers_legacy"
|
2017-02-07 00:16:46 +00:00
|
|
|
|
ss.source_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.{cpp,h}"
|
|
|
|
|
ss.private_header_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.h"
|
2017-03-18 19:21:50 +00:00
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
2016-11-23 19:33:44 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-05-03 21:31:35 +00:00
|
|
|
|
s.subspec "jschelpers" do |ss|
|
2017-05-30 18:10:20 +00:00
|
|
|
|
ss.dependency "Folly", "2016.09.26.00"
|
2017-05-03 21:31:35 +00: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
|
|
|
|
|
|
|
|
|
|
s.subspec "cxxreact" do |ss|
|
|
|
|
|
ss.dependency "React/jschelpers"
|
|
|
|
|
ss.dependency "boost"
|
2017-05-30 18:10:20 +00:00
|
|
|
|
ss.dependency "Folly", "2016.09.26.00"
|
2017-05-03 21:31:35 +00:00
|
|
|
|
ss.compiler_flags = folly_compiler_flags
|
|
|
|
|
ss.source_files = "ReactCommon/cxxreact/*.{cpp,h}"
|
2017-07-26 18:05:18 +00:00
|
|
|
|
ss.exclude_files = "ReactCommon/cxxreact/SampleCxxModule.*"
|
2017-05-03 21:31:35 +00:00
|
|
|
|
ss.private_header_files = "ReactCommon/cxxreact/*.h"
|
2017-06-15 19:47:42 +00:00
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Folly\"" }
|
2017-05-03 21:31:35 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "ART" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/ART/**/*.{h,m}"
|
2015-04-01 02:01:48 +00:00
|
|
|
|
end
|
2015-03-26 13:32:01 +00:00
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTActionSheet" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
|
2015-05-13 17:07:59 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTAdSupport" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/AdSupport/*.{h,m}"
|
2015-03-26 13:32:01 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTAnimation" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/NativeAnimation/{Drivers/*,Nodes/*,*}.{h,m}"
|
2017-05-09 18:01:03 +00:00
|
|
|
|
ss.header_dir = "RCTAnimation"
|
2015-03-26 13:32:01 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-07-26 15:12:12 +00:00
|
|
|
|
s.subspec "RCTBlob" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/Blob/*.{h,m}"
|
|
|
|
|
ss.preserve_paths = "Libraries/Blob/*.js"
|
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTCameraRoll" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
2017-07-26 15:12:12 +00:00
|
|
|
|
ss.dependency 'React/RCTImage'
|
2017-02-07 00:16:46 +00:00
|
|
|
|
ss.source_files = "Libraries/CameraRoll/*.{h,m}"
|
2016-06-30 08:40:57 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTGeolocation" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/Geolocation/*.{h,m}"
|
2015-11-19 09:26:58 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTImage" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.dependency "React/RCTNetwork"
|
|
|
|
|
ss.source_files = "Libraries/Image/*.{h,m}"
|
2015-03-26 13:32:01 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTNetwork" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/Network/*.{h,m,mm}"
|
2015-03-26 13:32:01 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTPushNotification" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/PushNotificationIOS/*.{h,m}"
|
2015-03-26 13:32:01 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTSettings" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/Settings/*.{h,m}"
|
2015-03-26 13:32:01 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTText" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/Text/*.{h,m}"
|
2015-03-26 13:32:01 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTVibration" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/Vibration/*.{h,m}"
|
2015-03-26 13:32:01 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTWebSocket" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
2017-07-26 15:12:12 +00:00
|
|
|
|
ss.dependency "React/RCTBlob"
|
2017-08-08 15:10:51 +00:00
|
|
|
|
ss.dependency "React/fishhook"
|
2017-02-07 00:16:46 +00:00
|
|
|
|
ss.source_files = "Libraries/WebSocket/*.{h,m}"
|
2015-03-26 13:32:01 +00:00
|
|
|
|
end
|
2015-05-14 11:07:07 +00:00
|
|
|
|
|
2017-08-08 15:10:51 +00:00
|
|
|
|
s.subspec "fishhook" do |ss|
|
|
|
|
|
ss.source_files = "Libraries/fishhook/*.{h,c}"
|
|
|
|
|
end
|
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTLinkingIOS" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/LinkingIOS/*.{h,m}"
|
2015-05-14 11:07:07 +00:00
|
|
|
|
end
|
2015-06-11 17:46:57 +00:00
|
|
|
|
|
2017-02-07 00:16:46 +00:00
|
|
|
|
s.subspec "RCTTest" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.source_files = "Libraries/RCTTest/**/*.{h,m}"
|
|
|
|
|
ss.frameworks = "XCTest"
|
2015-10-13 14:38:11 +00:00
|
|
|
|
end
|
2017-07-07 09:29:23 +00:00
|
|
|
|
|
|
|
|
|
s.subspec "_ignore_me_subspec_for_linting_" do |ss|
|
|
|
|
|
ss.dependency "React/Core"
|
|
|
|
|
ss.dependency "React/CxxBridge"
|
|
|
|
|
end
|
2015-03-26 13:32:01 +00:00
|
|
|
|
end
|