This repository was archived by the owner on Feb 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ Pod::Spec.new do |spec|
5959 end
6060
6161 spec . subspec 'Yoga' do |yoga |
62+ yoga . xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) YOGA=1' }
6263 yoga . dependency 'Yoga' , '1.0.2'
6364 yoga . dependency 'AsyncDisplayKit/Core'
6465 end
Original file line number Diff line number Diff line change 1313#import < AsyncDisplayKit/ASLayoutRangeType.h>
1414#import < AsyncDisplayKit/ASEventLog.h>
1515
16+ #if YOGA
17+ #import < Yoga/Yoga.h>
18+ #endif
19+
1620NS_ASSUME_NONNULL_BEGIN
1721
1822ASDISPLAYNODE_EXTERN_C_BEGIN
Original file line number Diff line number Diff line change 2222#ifndef IG_LIST_KIT
2323 #define IG_LIST_KIT __has_include(<IGListKit/IGListKit.h>)
2424#endif
25+
26+ #ifndef YOGA
27+ #define YOGA __has_include(<Yoga/Yoga.h>)
28+ #endif
Original file line number Diff line number Diff line change 1919#import < map>
2020#import < atomic>
2121
22+ #if YOGA
23+ #import < Yoga/Yoga.h>
24+ #endif
25+
2226extern void ASLayoutElementPerformBlockOnEveryElement (id <ASLayoutElement> element, void (^block)(id <ASLayoutElement> element))
2327{
2428 if (element) {
Original file line number Diff line number Diff line change 1010
1111#import < CoreFoundation/CFBase.h>
1212
13+ #pragma once
14+
1315#ifndef kCFCoreFoundationVersionNumber_iOS_9_0
1416 #define kCFCoreFoundationVersionNumber_iOS_9_0 1240.10
1517#endif
2426#define AS_TARGET_OS_OSX (!(TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH))
2527#define AS_TARGET_OS_IOS TARGET_OS_IPHONE
2628
27- #ifndef YOGA_HEADER_PATH
28- #define YOGA_HEADER_PATH <Yoga/Yoga.h>
29- #endif
30-
31- #ifndef YOGA
32- #define YOGA __has_include (YOGA_HEADER_PATH)
33- #endif
34-
3529// If Yoga is available, make it available anywhere we use ASAvailability.
36- // This reduces Yoga-specific code in other files.
37- #if YOGA
38- # import YOGA_HEADER_PATH
30+ // This reduces Yoga-specific code in other files.// If Yoga is available, make it available anywhere we use ASAvailability.
31+ #if __has_include(<Yoga/Yoga.h>)
32+ # define YOGA 1
3933#endif
4034
4135#if AS_TARGET_OS_OSX
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ if [ "$MODE" = "examples" ]; then
5656 for example in examples/* /; do
5757 echo " Building (examples) $example ."
5858
59+ rm -rf ~ /ModuleCache
60+ rm -rf ~ /Build
61+ rm -rf ~ /Info.plist
62+ rm -rf ~ /Logs
63+
5964 if [ -f " ${example} /Podfile" ]; then
6065 echo " Using CocoaPods"
6166 if [ -f " ${example} /Podfile.lock" ]; then
@@ -70,7 +75,7 @@ if [ "$MODE" = "examples" ]; then
7075 -sdk " $SDK " \
7176 -destination " $PLATFORM " \
7277 -derivedDataPath ~ / \
73- build | xcpretty $FORMATTER
78+ clean build | xcpretty $FORMATTER
7479 elif [ -f " ${example} /Cartfile" ]; then
7580 echo " Using Carthage"
7681 local_repo=` pwd`
You can’t perform that action at this time.
0 commit comments