Fixed the build issue for oss

Summary:
Our OSS build was failing with the latest version of cocoapods(1.6.0). The reason was that the `post_install` script of adding a `SWIFT_VERSION` was not getting applied while building the project. So I added a `swift_version` in the YogaKit pod itself. So with this change we no longer need the `post_install` script to add `SWIFT_VERSION`.

I have also released a new version of YogaKit(1.10.0) on the CocoaPods. Usually the swift pods should specify the swift_version which is being used to develop it.Due to unknown reason, it was never mentioned in the podspec.

Reviewed By: jknoxville

Differential Revision: D13990363

fbshipit-source-id: 3c2f814765c03683fbedd17b3607ff0e6cdef566
This commit is contained in:
Pritesh Nandgaonkar
2019-02-07 12:03:04 -08:00
committed by Facebook Github Bot
parent 3478968d3f
commit 697962359c
2 changed files with 1 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
folly_compiler_flags = '-DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0' folly_compiler_flags = '-DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0'
yoga_version = '~> 1.9' yoga_version = '~> 1.9'
yogakit_version = '~>1.8' yogakit_version = '~>1.10'
flipperkit_version = '0.15.0' flipperkit_version = '0.15.0'
Pod::Spec.new do |spec| Pod::Spec.new do |spec|
spec.name = 'FlipperKit' spec.name = 'FlipperKit'

View File

@@ -14,13 +14,6 @@ target 'Sample' do
# This post_install script adds swift version to yogakit's pod target. # This post_install script adds swift version to yogakit's pod target.
# It also adds -DFB_SONARKIT_ENABLED=1 flag to OTHER_CFLAGS, necessary to build expose Flipper classes in the header files # It also adds -DFB_SONARKIT_ENABLED=1 flag to OTHER_CFLAGS, necessary to build expose Flipper classes in the header files
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target|
if ['YogaKit'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = swift_version
end
end
end
file_name = Dir.glob("*.xcodeproj")[0] file_name = Dir.glob("*.xcodeproj")[0]
app_project = Xcodeproj::Project.open(file_name) app_project = Xcodeproj::Project.open(file_name)
app_project.native_targets.each do |target| app_project.native_targets.each do |target|