2018-02-05 19:47:10 +00:00
|
|
|
|
# coding: utf-8
|
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" }
|
2018-02-17 02:25:02 +00:00
|
|
|
|
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
|
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-11-21 18:10:30 +00:00
|
|
|
|
ss.source_files = "React/**/*.{c,h,m,mm,S,cpp}"
|
2017-07-07 09:29:23 +00:00
|
|
|
|
ss.exclude_files = "**/__tests__/*",
|
|
|
|
|
"IntegrationTests/*",
|
|
|
|
|
"React/DevSupport/*",
|
|
|
|
|
"React/Inspector/*",
|
|
|
|
|
"ReactCommon/yoga/*",
|
|
|
|
|
"React/Cxx*/*",
|
2017-11-27 23:35:55 +00:00
|
|
|
|
ss.ios.exclude_files = "React/**/RCTTV*.*"
|
2017-07-18 22:03:37 +00: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 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 "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"
|
2017-11-27 23:35:55 +00:00
|
|
|
|
ss.source_files = "React/**/RCTTV*.{h, m}"
|
2017-01-07 01:09:39 +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-11-03 23:21:07 +00:00
|
|
|
|
ss.dependency "React/PrivateDatabase"
|
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
|
|
|
|
|
|
2017-11-27 15:05:22 +00: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 23:21:07 +00:00
|
|
|
|
s.subspec "PrivateDatabase" do |ss|
|
|
|
|
|
ss.source_files = "ReactCommon/privatedata/*.{cpp,h}"
|
|
|
|
|
ss.private_header_files = "ReactCommon/privatedata/*.h"
|
2017-11-04 19:37:19 +00:00
|
|
|
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
2017-11-03 23:21:07 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-05-03 21:31:35 +00:00
|
|
|
|
s.subspec "cxxreact" do |ss|
|
|
|
|
|
ss.dependency "React/jschelpers"
|
2017-11-27 15:05:22 +00:00
|
|
|
|
ss.dependency "React/jsinspector"
|
2018-01-18 03:11:48 +00:00
|
|
|
|
ss.dependency "boost-for-react-native", "1.63.0"
|
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"
|
2018-01-18 03:11:48 +00: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 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 "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"
|
2018-01-26 17:06:14 +00:00
|
|
|
|
ss.source_files = "Libraries/Blob/*.{h,m,mm}"
|
2017-07-26 15:12:12 +00:00
|
|
|
|
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"
|
2018-01-18 21:02:57 +00:00
|
|
|
|
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|
|
2017-10-04 01:12:39 +00:00
|
|
|
|
ss.header_dir = "fishhook"
|
2017-08-08 15:10:51 +00:00
|
|
|
|
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
|