Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 77f29a8

Browse files
authored
Fix CI that broke due to Yoga merge (#3012)
* Fix CI that broke due to Yoga merge * Next round * Add clean before building * Try something else * Some more burritos
1 parent f912657 commit 77f29a8

6 files changed

Lines changed: 24 additions & 12 deletions

File tree

AsyncDisplayKit.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

AsyncDisplayKit/ASDisplayNode+Beta.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
#import <AsyncDisplayKit/ASLayoutRangeType.h>
1414
#import <AsyncDisplayKit/ASEventLog.h>
1515

16+
#if YOGA
17+
#import <Yoga/Yoga.h>
18+
#endif
19+
1620
NS_ASSUME_NONNULL_BEGIN
1721

1822
ASDISPLAYNODE_EXTERN_C_BEGIN

AsyncDisplayKit/AsyncDisplayKit-Prefix.pch

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@
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

AsyncDisplayKit/Layout/ASLayoutElement.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
#import <map>
2020
#import <atomic>
2121

22+
#if YOGA
23+
#import <Yoga/Yoga.h>
24+
#endif
25+
2226
extern void ASLayoutElementPerformBlockOnEveryElement(id<ASLayoutElement> element, void(^block)(id<ASLayoutElement> element))
2327
{
2428
if (element) {

Base/ASAvailability.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
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
@@ -24,18 +26,10 @@
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

build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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`

0 commit comments

Comments
 (0)