Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade yoga to v3.1.0 #266

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Example/cocoapods/FlexLayoutSample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
249EFE361E64FAFE00165E39 = {
isa = PBXGroup;
children = (
249EFE411E64FAFE00165E39 /* FlexLayoutSample */,
249EFE411E64FAFE00165E39 /* ../FlexLayoutSample */,
461884C59B72ACEAFC912B8A /* Frameworks */,
85CAAE97812075333AF3E88F /* Pods */,
249EFE401E64FAFE00165E39 /* Products */,
Expand All @@ -214,7 +214,7 @@
name = Products;
sourceTree = "<group>";
};
249EFE411E64FAFE00165E39 /* FlexLayoutSample */ = {
249EFE411E64FAFE00165E39 /* ../FlexLayoutSample */ = {
isa = PBXGroup;
children = (
2439CC671E66614D003326FB /* Supporting Files */,
Expand Down Expand Up @@ -449,11 +449,13 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FlexLayoutSample/Pods-FlexLayoutSample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Yoga/yoga.framework",
"${BUILT_PRODUCTS_DIR}/FlexLayout/FlexLayout.framework",
"${BUILT_PRODUCTS_DIR}/PinLayout/PinLayout.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FlexLayout.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PinLayout.framework",
);
Expand All @@ -475,7 +477,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "Pods/SwiftLint/swiftlint ../FlexLayoutSample\n";
shellScript = "\"${PODS_ROOT}/SwiftLint/swiftlint\" --path ../FlexLayoutSample\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
2 changes: 2 additions & 0 deletions FlexLayout.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ Pod::Spec.new do |spec|
'-std=c++20',
'-fPIC'
]

spec.dependency 'Yoga'
end
373 changes: 45 additions & 328 deletions FlexLayout.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "yoga",
"repositoryURL": "https://github.com/facebook/yoga.git",
"state": {
"branch": null,
"revision": "69b8934429702bd3ab06e8d6f709112a761b474b",
"version": "3.1.0"
}
}
]
},
"version": 1
}
13 changes: 5 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,24 @@ import PackageDescription
let package = Package(
name: "FlexLayout",
platforms: [
.iOS(.v12)
.iOS(.v12),
],
products: [
.library(name: "FlexLayout", targets: ["FlexLayout"]),
],
dependencies: [
.package(url: "https://github.com/facebook/yoga.git", from: "3.1.0"),
],
targets: [
.target(
name: "FlexLayout",
dependencies: ["FlexLayoutYogaKit"],
path: "Sources/Swift",
publicHeadersPath: "Public"
),
.target(
name: "FlexLayoutYoga",
dependencies: [],
path: "Sources/yoga",
publicHeadersPath: "include/yoga"
),
.target(
name: "FlexLayoutYogaKit",
dependencies: ["FlexLayoutYoga"],
dependencies: ["yoga"],
path: "Sources/YogaKit",
publicHeadersPath: "include/YogaKit"
),
Expand Down
6 changes: 5 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
source 'https://cdn.cocoapods.org/'
use_frameworks!
platform :ios, '12.0'
platform :ios, '14.0'

workspace 'FlexLayout.xcworkspace'

target 'FlexLayout' do
pod 'Yoga', git: 'https://github.com/facebook/yoga.git', tag: 'v3.1.0'
end

target 'FlexLayoutTests' do
project 'FlexLayout.xcodeproj'
pod 'FlexLayout', path: './'
Expand Down
20 changes: 16 additions & 4 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
PODS:
- FlexLayout (2.0.10)
- FlexLayout (2.0.10):
- Yoga
- PinLayout (1.10.5)
- SwiftLint (0.55.1)
- Yoga (3.1.0)

DEPENDENCIES:
- FlexLayout (from `./`)
- PinLayout
- SwiftLint
- Yoga (from `https://github.com/facebook/yoga.git`, tag `v3.1.0`)

SPEC REPOS:
trunk:
Expand All @@ -16,12 +19,21 @@ SPEC REPOS:
EXTERNAL SOURCES:
FlexLayout:
:path: "./"
Yoga:
:git: https://github.com/facebook/yoga.git
:tag: v3.1.0

CHECKOUT OPTIONS:
Yoga:
:git: https://github.com/facebook/yoga.git
:tag: v3.1.0

SPEC CHECKSUMS:
FlexLayout: ea94491c923485f7f28891cb5b10245d22df380b
FlexLayout: a480ae4cb2b8a595c646cf7a3d2c7747951700a1
PinLayout: f6c2b63a5a5b24864064e1d15c67de41b4e74748
SwiftLint: 3fe909719babe5537c552ee8181c0031392be933
Yoga: 73e3c7ca57e233ad32a1a265a8b55dcce6c4d529

PODFILE CHECKSUM: a0f152e938c551fd661bee3ffe26ccc6175f088b
PODFILE CHECKSUM: 616cb577f11ab8498737680dedeed47c6fae4b64

COCOAPODS: 1.14.3
COCOAPODS: 1.15.2
60 changes: 1 addition & 59 deletions Sources/Swift/Impl/FlexLayout+Enum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,65 +14,7 @@

import UIKit

#if SWIFT_PACKAGE
import FlexLayoutYoga

extension YGFlexDirection {
static let column = YGFlexDirectionColumn
static let columnReverse = YGFlexDirectionColumnReverse
static let row = YGFlexDirectionRow
static let rowReverse = YGFlexDirectionRowReverse
}

extension YGJustify {
static let flexStart = YGJustifyFlexStart
static let center = YGJustifyCenter
static let flexEnd = YGJustifyFlexEnd
static let spaceBetween = YGJustifySpaceBetween
static let spaceAround = YGJustifySpaceAround
static let spaceEvenly = YGJustifySpaceEvenly
}

extension YGAlign {
static let auto = YGAlignAuto
static let baseline = YGAlignBaseline
static let stretch = YGAlignStretch
static let flexStart = YGAlignFlexStart
static let center = YGAlignCenter
static let flexEnd = YGAlignFlexEnd
static let spaceBetween = YGAlignSpaceBetween
static let spaceAround = YGAlignSpaceAround
static let spaceEvenly = YGAlignSpaceEvenly
}

extension YGWrap {
static let noWrap = YGWrapNoWrap
static let wrap = YGWrapWrap
static let wrapReverse = YGWrapWrapReverse
}

extension YGPositionType {
static let relative = YGPositionTypeRelative
static let absolute = YGPositionTypeAbsolute
static let `static` = YGPositionTypeStatic
}

extension YGDirection {
static let LTR = YGDirectionLTR
static let RTL = YGDirectionRTL
static let inherit = YGDirectionInherit
}

extension YGDisplay {
static let flex = YGDisplayFlex
static let none = YGDisplayNone
}

extension YGUnit {
static let percent = YGUnitPercent
static let point = YGUnitPoint
}
#endif
import yoga

extension Flex.Direction {
var yogaValue: YGFlexDirection {
Expand Down
4 changes: 1 addition & 3 deletions Sources/Swift/Impl/FlexLayout+Private.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

import UIKit

#if SWIFT_PACKAGE
import FlexLayoutYoga
#endif
import yoga

extension Flex {
func valueOrUndefined(_ value: CGFloat?) -> YGValue {
Expand Down
4 changes: 1 addition & 3 deletions Sources/Swift/YGLayoutExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

import CoreGraphics

#if SWIFT_PACKAGE
import FlexLayoutYoga
#endif
import yoga

extension Int {
public static postfix func %(value: Int) -> YGValue {
Expand Down
2 changes: 1 addition & 1 deletion Sources/YogaKit/include/YogaKit/YGLayout+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

#import "Yoga.h"
#import <yoga/Yoga.h>
#import "YGLayout.h"

@interface YGLayout ()
Expand Down
6 changes: 3 additions & 3 deletions Sources/YogaKit/include/YogaKit/YGLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

#import <UIKit/UIKit.h>

#import "YGEnums.h"
#import "YGMacros.h"
#import "Yoga.h"
#import <yoga/YGEnums.h>
#import <yoga/YGMacros.h>
#import <yoga/Yoga.h>

YG_EXTERN_C_BEGIN

Expand Down
Loading
Loading