Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fabric podspecs #23550

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 102 additions & 27 deletions React.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Pod::Spec.new do |s|
"React/Views/RCTSlider*",
"React/Views/RCTSwitch*",
"React/Views/RCTWebView*"
ss.compiler_flags = folly_compiler_flags
ss.header_dir = "React"
ss.framework = "JavaScriptCore"
ss.libraries = "stdc++"
Expand Down Expand Up @@ -95,8 +94,10 @@ Pod::Spec.new do |s|
ss.dependency "React/Core"
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.source_files = "React/Fabric/**/*.{c,h,m,mm,S,cpp}",
"ReactCommon/fabric/**/*.{c,h,m,mm,S,cpp}"
ss.exclude_files = "**/tests/*",
"**/android/*"
ss.header_dir = "React"
ss.framework = "JavaScriptCore"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
Expand All @@ -117,19 +118,15 @@ Pod::Spec.new do |s|
ss.dependency "React/cxxreact"
ss.dependency "React/jsi"
ss.dependency "Folly", folly_version
ss.dependency "DoubleConversion"
ss.dependency "glog"
ss.compiler_flags = folly_compiler_flags
ss.source_files = "ReactCommon/jsiexecutor/jsireact/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jsiexecutor/jsireact/*.h"
ss.header_dir = "jsireact"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\", \"$(PODS_TARGET_SRCROOT)/ReactCommon/jsiexecutor\"" }
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end

s.subspec "jsi" do |ss|
ss.dependency "Folly", folly_version
ss.dependency "DoubleConversion"
ss.dependency "glog"
ss.compiler_flags = folly_compiler_flags
ss.source_files = "ReactCommon/jsi/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jsi/*.h"
Expand All @@ -147,8 +144,6 @@ Pod::Spec.new do |s|
ss.dependency "React/jsinspector"
ss.dependency "boost-for-react-native", "1.63.0"
ss.dependency "Folly", folly_version
ss.dependency "DoubleConversion"
ss.dependency "glog"
ss.compiler_flags = folly_compiler_flags
ss.source_files = "ReactCommon/cxxreact/*.{cpp,h}"
ss.exclude_files = "ReactCommon/cxxreact/SampleCxxModule.*"
Expand All @@ -160,9 +155,9 @@ Pod::Spec.new do |s|
ss.subspec "activityindicator" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/activityindicator/**/*.{cpp,h}"
sss.source_files = "ReactCommon/fabric/components/activityindicator/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "fabric/activityindicator"
sss.header_dir = "react/components/activityindicator"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

Expand All @@ -171,7 +166,16 @@ Pod::Spec.new do |s|
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/attributedstring/**/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "fabric/attributedstring"
sss.header_dir = "react/attributedstring"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "config" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/config/**/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/config"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

Expand All @@ -180,7 +184,7 @@ Pod::Spec.new do |s|
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/core/**/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "fabric/core"
sss.header_dir = "react/core"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

Expand All @@ -189,43 +193,105 @@ Pod::Spec.new do |s|
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/debug/**/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "fabric/debug"
sss.header_dir = "react/debug"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "events" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/events/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/events"
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.source_files = "ReactCommon/fabric/graphics/*.{cpp,h}",
"ReactCommon/fabric/graphics/platform/ios/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/graphics"
sss.frameworks = "CoreGraphics",
"UIKit",
"Foundation"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "image" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/components/image/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/image"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "imagemanager" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/imagemanager/*.{cpp,h}",
"ReactCommon/fabric/imagemanager/platform/ios/*.{cpp,h,mm}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/imagemanager"
sss.frameworks = "CoreGraphics",
"UIKit",
"Foundation"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "mounting" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/mounting/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/mounting"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "root" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/components/root/**/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "fabric/graphics"
sss.header_dir = "react/components/root"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "scrollview" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/scrollview/**/*.{cpp,h}"
sss.source_files = "ReactCommon/fabric/components/scrollview/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "fabric/scrollview"
sss.header_dir = "react/components/scrollview"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "slider" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/components/slider/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/slider"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "text" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/text/**/*.{cpp,h}"
sss.source_files = "ReactCommon/fabric/components/text/**/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "fabric/text"
sss.header_dir = "react/components/text"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "textlayoutmanager" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/textlayoutmanager/**/*.{cpp,h,mm}"
sss.source_files = "ReactCommon/fabric/textlayoutmanager/platform/ios/**/*.{cpp,h,mm}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "fabric/textlayoutmanager"
sss.header_dir = "react/textlayoutmanager"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

Expand All @@ -234,17 +300,26 @@ Pod::Spec.new do |s|
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/fabric/uimanager/**/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "fabric/uimanager"
sss.header_dir = "react/uimanager"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end

ss.subspec "utils" do |sss|
sss.dependency "Folly", folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "ReactCommon/utils/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/utils"
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.source_files = "ReactCommon/fabric/components/view/**/*.{cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "fabric/view"
sss.header_dir = "react/components/view"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
end
Expand Down Expand Up @@ -350,4 +425,4 @@ Pod::Spec.new do |s|
ss.dependency "React/Core"
ss.dependency "React/CxxBridge"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ComponentRegistryFactory getDefaultComponentRegistryFactory() {
const SharedContextContainer &contextContainer) {
auto registry = std::make_shared<ComponentDescriptorRegistry>();
return registry;
}
};
}

} // namespace react
Expand Down
55 changes: 51 additions & 4 deletions third-party-podspecs/Folly.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,55 @@ Pod::Spec.new do |spec|
spec.dependency 'boost-for-react-native'
spec.dependency 'DoubleConversion'
spec.dependency 'glog'
spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
spec.dependency 'libevent'
spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_PTHREAD=1'
spec.source_files = 'folly/String.cpp',
'folly/Conv.cpp',
'folly/Demangle.cpp',
'folly/Format.cpp',
'folly/FileUtil.cpp',
'folly/ScopeGuard.cpp',
'folly/StringBase.cpp',
'folly/Unicode.cpp',
'folly/dynamic.cpp',
'folly/json.cpp',
'folly/json_pointer.cpp',
'folly/container/detail/F14Table.cpp',
'folly/detail/Demangle.cpp',
'folly/detail/AtFork.cpp',
'folly/detail/MemoryIdler.cpp',
'folly/detail/StaticSingletonManager.cpp',
'folly/hash/SpookyHashV2.cpp',
'folly/futures/Future.cpp',
'folly/lang/Assume.cpp',
'folly/lang/ColdClass.cpp',
'folly/memory/detail/MallocImpl.cpp'
'folly/portability/BitsFunctexcept.cpp',
'folly/memory/detail/MallocImpl.cpp',
'folly/memory/MallctlHelper.cpp',
'folly/futures/ThreadWheelTimekeeper.cpp',
'folly/Executor.cpp',
'folly/executors/InlineExecutor.cpp',
'folly/executors/TimedDrivableExecutor.cpp',
'folly/ExceptionWrapper.cpp',
'folly/io/async/Request.cpp',
'folly/detail/ThreadLocalDetail.cpp',
'folly/SharedMutex.cpp',
'folly/concurrency/CacheLocality.cpp',
'folly/detail/Futex.cpp',
'folly/portability/SysUio.cpp',
'folly/synchronization/ParkingLot.cpp',
'folly/synchronization/Hazptr.cpp',
'folly/io/async/HHWheelTimer.cpp',
'folly/synchronization/WaitOptions.cpp',
'folly/synchronization/AsymmetricMemoryBarrier.cpp',
'folly/io/async/AsyncTimeout.cpp',
'folly/io/async/EventBase.cpp',
'folly/io/async/EventHandler.cpp',
'folly/system/ThreadName.cpp',
'folly/Singleton.cpp',
'folly/io/async/VirtualEventBase.cpp',
'folly/io/async/TimeoutManager.cpp',
'folly/lang/SafeAssert.cpp'
# workaround for https://github.com/facebook/react-native/issues/14326
spec.preserve_paths = 'folly/*.h',
'folly/container/*.h',
Expand All @@ -40,14 +73,28 @@ Pod::Spec.new do |spec|
'folly/functional/*.h',
'folly/hash/*.h',
'folly/lang/*.h',
'folly/futures/*.h',
'folly/futures/detail/*.h',
'folly/executors/*.h',
'folly/concurrency/*.h',
'folly/system/*.h',
'folly/synchronization/*.h',
'folly/synchronization/detail/*.h',
'folly/io/async/*.h',
'folly/tracing/*.h',
'folly/experimental/*.h',
'folly/memory/*.h',
'folly/memory/detail/*.h',
'folly/portability/*.h'
spec.libraries = "stdc++"
spec.libraries = "c++"
spec.xcconfig = {
'USE_HEADERMAP' => 'NO',
}
spec.header_mappings_dir = '.'
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\"" }

# Pinning to the same version as React.podspec.
spec.platforms = { :ios => "9.0", :tvos => "9.2" }
end
end
Loading