From 7df60376ff6a6c2681fa307c985a9905d2c010d8 Mon Sep 17 00:00:00 2001 From: Guido Marucci Blas Date: Fri, 27 Jan 2017 09:57:55 -0800 Subject: [PATCH] CocoaPods support. Summary: This supersedes #309 and #305. This is still a **work-in-progress.** **TODO** - [x] Create Xcode project that builds an iOS framework - [x] Fix failing tests on Xcode - [ ] Make `pod lib lint` pass and make sure YogaKit can be included using CocoaPods - [ ] Add `pod lib lint` to .travis.yml - [x] Migrate to travis osx image with Xcode 8.2 **FOLLOW-UP** - [ ] Make YogaKitSample use framework built by new Xcode project. - [ ] Make Travis to upload prebuilt versions of the framework. More [here](https://github.com/Carthage/Carthage#use-travis-ci-to-upload-your-tagged-prebuild-frameworks) - [ ] Upgrade github/jekyll docs about installation using Cocoapods/Carthage Closes https://github.com/facebook/yoga/pull/352 Reviewed By: emilsjolander Differential Revision: D4471950 Pulled By: dshahidehpour fbshipit-source-id: 8f30c69f9a487b26aa2e5f3b66841334b01b0ab1 --- YogaKit/.swift-version | 1 + YogaKit/BUCK | 4 ++-- YogaKit/{ => Source}/UIView+Yoga.h | 0 YogaKit/{ => Source}/UIView+Yoga.m | 0 YogaKit/{ => Source}/YGLayout+Private.h | 0 YogaKit/{ => Source}/YGLayout.h | 0 YogaKit/{ => Source}/YGLayout.m | 0 YogaKit/YogaKit.podspec | 30 +++++++++++++++++++++++++ 8 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 YogaKit/.swift-version rename YogaKit/{ => Source}/UIView+Yoga.h (100%) rename YogaKit/{ => Source}/UIView+Yoga.m (100%) rename YogaKit/{ => Source}/YGLayout+Private.h (100%) rename YogaKit/{ => Source}/YGLayout.h (100%) rename YogaKit/{ => Source}/YGLayout.m (100%) create mode 100644 YogaKit/YogaKit.podspec diff --git a/YogaKit/.swift-version b/YogaKit/.swift-version new file mode 100644 index 00000000..b5021469 --- /dev/null +++ b/YogaKit/.swift-version @@ -0,0 +1 @@ +3.0.2 diff --git a/YogaKit/BUCK b/YogaKit/BUCK index 900ededb..67219020 100644 --- a/YogaKit/BUCK +++ b/YogaKit/BUCK @@ -30,8 +30,8 @@ COMPILER_FLAGS = [ apple_library( name = 'YogaKit', compiler_flags = COMPILER_FLAGS, - srcs = glob(['*.m']), - exported_headers = glob(['*.h']), + srcs = glob(['Source/**/*.m']), + exported_headers = glob(['Source/**/*.h']), frameworks = [ '$SDKROOT/System/Library/Frameworks/Foundation.framework', '$SDKROOT/System/Library/Frameworks/UIKit.framework', diff --git a/YogaKit/UIView+Yoga.h b/YogaKit/Source/UIView+Yoga.h similarity index 100% rename from YogaKit/UIView+Yoga.h rename to YogaKit/Source/UIView+Yoga.h diff --git a/YogaKit/UIView+Yoga.m b/YogaKit/Source/UIView+Yoga.m similarity index 100% rename from YogaKit/UIView+Yoga.m rename to YogaKit/Source/UIView+Yoga.m diff --git a/YogaKit/YGLayout+Private.h b/YogaKit/Source/YGLayout+Private.h similarity index 100% rename from YogaKit/YGLayout+Private.h rename to YogaKit/Source/YGLayout+Private.h diff --git a/YogaKit/YGLayout.h b/YogaKit/Source/YGLayout.h similarity index 100% rename from YogaKit/YGLayout.h rename to YogaKit/Source/YGLayout.h diff --git a/YogaKit/YGLayout.m b/YogaKit/Source/YGLayout.m similarity index 100% rename from YogaKit/YGLayout.m rename to YogaKit/Source/YGLayout.m diff --git a/YogaKit/YogaKit.podspec b/YogaKit/YogaKit.podspec new file mode 100644 index 00000000..a2478d84 --- /dev/null +++ b/YogaKit/YogaKit.podspec @@ -0,0 +1,30 @@ +Pod::Spec.new do |spec| + spec.name = 'YogaKit' + spec.version = '1.0.0' + spec.license = { :type => 'BSD-3-Clause', :file => '../LICENSE' } + spec.homepage = 'https://facebook.github.io/yoga' + spec.authors = { + 'Emil Sjölander' => 'sjolander.emil@gmail.com', + 'Dustin Shahidehpour' => 'dshahidehpour@gmail.com' + } + + spec.summary = 'Yoga is a cross-platform layout engine which implements Flexbox.' + spec.description = <<-DESC + Yoga is a cross-platform layout engine which implements Flexbox. + It enables maximum collaboration within your team by implementing an API familiar to + many designers and opening it up to developers across different platforms. + DESC + + spec.documentation_url = 'https://facebook.github.io/yoga/docs/getting-started/' + spec.source = { + :git => 'https://github.com/facebook/yoga.git', + :tag => 'v2017.01.23.00' + } + spec.platform = :ios + + spec.dependency 'Yoga', '~> 1.0' + spec.source_files = 'Source/*.{h,m}', + spec.public_header_files = 'Source/{YGLayout,UIView+Yoga}.h' + spec.private_header_files = 'Source/YGLayout+Private.h' + +end