Skip to content

Commit 0ceb4f5

Browse files
authored
Merge pull request #266 from OhKanghoon/update-yoga
Upgrade yoga to v3.1.0
2 parents d382904 + 0c8587e commit 0ceb4f5

File tree

90 files changed

+130
-10446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+130
-10446
lines changed

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/cocoapods/FlexLayoutSample.xcodeproj/project.pbxproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,11 +449,13 @@
449449
);
450450
inputPaths = (
451451
"${PODS_ROOT}/Target Support Files/Pods-FlexLayoutSample/Pods-FlexLayoutSample-frameworks.sh",
452+
"${BUILT_PRODUCTS_DIR}/Yoga/yoga.framework",
452453
"${BUILT_PRODUCTS_DIR}/FlexLayout/FlexLayout.framework",
453454
"${BUILT_PRODUCTS_DIR}/PinLayout/PinLayout.framework",
454455
);
455456
name = "[CP] Embed Pods Frameworks";
456457
outputPaths = (
458+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework",
457459
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FlexLayout.framework",
458460
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PinLayout.framework",
459461
);
@@ -475,7 +477,7 @@
475477
);
476478
runOnlyForDeploymentPostprocessing = 0;
477479
shellPath = /bin/sh;
478-
shellScript = "Pods/SwiftLint/swiftlint ../FlexLayoutSample\n";
480+
shellScript = "\"${PODS_ROOT}/SwiftLint/swiftlint\" --path ../FlexLayoutSample\n";
479481
};
480482
/* End PBXShellScriptBuildPhase section */
481483

Example/cocoapods/Podfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

Example/cocoapods/Podfile.lock

Lines changed: 0 additions & 27 deletions
This file was deleted.

FlexLayout.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Pod::Spec.new do |spec|
1010
spec.platform = :ios, "12.0"
1111
spec.source = { :git => "https://github.com/lucdion/FlexLayout.git", :tag => "#{spec.version}" }
1212
spec.source_files = "Sources/**/*.{swift,h,m,mm,cpp,c}"
13-
spec.public_header_files = "Sources/yoga/include/yoga/*.h", "Sources/YogaKit/include/YogaKit/*.h"
13+
spec.public_header_files = "Sources/YogaKit/include/YogaKit/*.h"
1414
spec.libraries = 'c++'
1515

1616
# Should match yoga_defs.bzl + BUCK configuration
@@ -22,4 +22,6 @@ Pod::Spec.new do |spec|
2222
'-std=c++20',
2323
'-fPIC'
2424
]
25+
26+
spec.dependency 'Yoga'
2527
end

FlexLayout.xcodeproj/project.pbxproj

Lines changed: 45 additions & 328 deletions
Large diffs are not rendered by default.

Package.resolved

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "yoga",
6+
"repositoryURL": "https://github.com/facebook/yoga.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "69b8934429702bd3ab06e8d6f709112a761b474b",
10+
"version": "3.1.0"
11+
}
12+
}
13+
]
14+
},
15+
"version": 1
16+
}

Package.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,24 @@ import PackageDescription
66
let package = Package(
77
name: "FlexLayout",
88
platforms: [
9-
.iOS(.v12)
9+
.iOS(.v12),
1010
],
1111
products: [
1212
.library(name: "FlexLayout", targets: ["FlexLayout"]),
1313
],
14+
dependencies: [
15+
.package(url: "https://github.com/facebook/yoga.git", from: "3.1.0"),
16+
],
1417
targets: [
1518
.target(
1619
name: "FlexLayout",
1720
dependencies: ["FlexLayoutYogaKit"],
1821
path: "Sources/Swift",
1922
publicHeadersPath: "Public"
2023
),
21-
.target(
22-
name: "FlexLayoutYoga",
23-
dependencies: [],
24-
path: "Sources/yoga",
25-
publicHeadersPath: "include/yoga"
26-
),
2724
.target(
2825
name: "FlexLayoutYogaKit",
29-
dependencies: ["FlexLayoutYoga"],
26+
dependencies: ["yoga"],
3027
path: "Sources/YogaKit",
3128
publicHeadersPath: "include/YogaKit"
3229
),

Podfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
source 'https://cdn.cocoapods.org/'
22
use_frameworks!
3-
platform :ios, '12.0'
3+
platform :ios, '14.0'
44

55
workspace 'FlexLayout.xcworkspace'
66

7+
target 'FlexLayout' do
8+
pod 'Yoga', git: 'https://github.com/facebook/yoga.git', tag: 'v3.1.0'
9+
end
10+
711
target 'FlexLayoutTests' do
812
project 'FlexLayout.xcodeproj'
913
pod 'FlexLayout', path: './'

Podfile.lock

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
PODS:
2-
- FlexLayout (2.0.10)
2+
- FlexLayout (2.0.10):
3+
- Yoga
34
- PinLayout (1.10.5)
45
- SwiftLint (0.55.1)
6+
- Yoga (3.1.0)
57

68
DEPENDENCIES:
79
- FlexLayout (from `./`)
810
- PinLayout
911
- SwiftLint
12+
- Yoga (from `https://github.com/facebook/yoga.git`, tag `v3.1.0`)
1013

1114
SPEC REPOS:
1215
trunk:
@@ -16,12 +19,21 @@ SPEC REPOS:
1619
EXTERNAL SOURCES:
1720
FlexLayout:
1821
:path: "./"
22+
Yoga:
23+
:git: https://github.com/facebook/yoga.git
24+
:tag: v3.1.0
25+
26+
CHECKOUT OPTIONS:
27+
Yoga:
28+
:git: https://github.com/facebook/yoga.git
29+
:tag: v3.1.0
1930

2031
SPEC CHECKSUMS:
21-
FlexLayout: ea94491c923485f7f28891cb5b10245d22df380b
32+
FlexLayout: aaf305c1f3203be3d8694c3835773d1e7a912b72
2233
PinLayout: f6c2b63a5a5b24864064e1d15c67de41b4e74748
2334
SwiftLint: 3fe909719babe5537c552ee8181c0031392be933
35+
Yoga: 73e3c7ca57e233ad32a1a265a8b55dcce6c4d529
2436

25-
PODFILE CHECKSUM: a0f152e938c551fd661bee3ffe26ccc6175f088b
37+
PODFILE CHECKSUM: 616cb577f11ab8498737680dedeed47c6fae4b64
2638

2739
COCOAPODS: 1.14.3

Sources/Swift/Impl/FlexLayout+Enum.swift

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -14,65 +14,7 @@
1414

1515
import UIKit
1616

17-
#if SWIFT_PACKAGE
18-
import FlexLayoutYoga
19-
20-
extension YGFlexDirection {
21-
static let column = YGFlexDirectionColumn
22-
static let columnReverse = YGFlexDirectionColumnReverse
23-
static let row = YGFlexDirectionRow
24-
static let rowReverse = YGFlexDirectionRowReverse
25-
}
26-
27-
extension YGJustify {
28-
static let flexStart = YGJustifyFlexStart
29-
static let center = YGJustifyCenter
30-
static let flexEnd = YGJustifyFlexEnd
31-
static let spaceBetween = YGJustifySpaceBetween
32-
static let spaceAround = YGJustifySpaceAround
33-
static let spaceEvenly = YGJustifySpaceEvenly
34-
}
35-
36-
extension YGAlign {
37-
static let auto = YGAlignAuto
38-
static let baseline = YGAlignBaseline
39-
static let stretch = YGAlignStretch
40-
static let flexStart = YGAlignFlexStart
41-
static let center = YGAlignCenter
42-
static let flexEnd = YGAlignFlexEnd
43-
static let spaceBetween = YGAlignSpaceBetween
44-
static let spaceAround = YGAlignSpaceAround
45-
static let spaceEvenly = YGAlignSpaceEvenly
46-
}
47-
48-
extension YGWrap {
49-
static let noWrap = YGWrapNoWrap
50-
static let wrap = YGWrapWrap
51-
static let wrapReverse = YGWrapWrapReverse
52-
}
53-
54-
extension YGPositionType {
55-
static let relative = YGPositionTypeRelative
56-
static let absolute = YGPositionTypeAbsolute
57-
static let `static` = YGPositionTypeStatic
58-
}
59-
60-
extension YGDirection {
61-
static let LTR = YGDirectionLTR
62-
static let RTL = YGDirectionRTL
63-
static let inherit = YGDirectionInherit
64-
}
65-
66-
extension YGDisplay {
67-
static let flex = YGDisplayFlex
68-
static let none = YGDisplayNone
69-
}
70-
71-
extension YGUnit {
72-
static let percent = YGUnitPercent
73-
static let point = YGUnitPoint
74-
}
75-
#endif
17+
import yoga
7618

7719
extension Flex.Direction {
7820
var yogaValue: YGFlexDirection {

Sources/Swift/Impl/FlexLayout+Private.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
import UIKit
1010

11-
#if SWIFT_PACKAGE
12-
import FlexLayoutYoga
13-
#endif
11+
import yoga
1412

1513
extension Flex {
1614
func valueOrUndefined(_ value: CGFloat?) -> YGValue {

Sources/Swift/YGLayoutExtensions.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
import CoreGraphics
99

10-
#if SWIFT_PACKAGE
11-
import FlexLayoutYoga
12-
#endif
10+
import yoga
1311

1412
extension Int {
1513
public static postfix func %(value: Int) -> YGValue {

Sources/YogaKit/include/YogaKit/YGLayout+Private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
#import "Yoga.h"
8+
#import <yoga/Yoga.h>
99
#import "YGLayout.h"
1010

1111
@interface YGLayout ()

Sources/YogaKit/include/YogaKit/YGLayout.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
#import <UIKit/UIKit.h>
99

10-
#import "YGEnums.h"
11-
#import "YGMacros.h"
12-
#import "Yoga.h"
10+
#import <yoga/YGEnums.h>
11+
#import <yoga/YGMacros.h>
12+
#import <yoga/Yoga.h>
1313

1414
YG_EXTERN_C_BEGIN
1515

0 commit comments

Comments
 (0)