Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Example/cocoapods/FlexLayoutSample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
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
15 changes: 0 additions & 15 deletions Example/cocoapods/Podfile

This file was deleted.

27 changes: 0 additions & 27 deletions Example/cocoapods/Podfile.lock

This file was deleted.

4 changes: 3 additions & 1 deletion FlexLayout.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |spec|
spec.platform = :ios, "12.0"
spec.source = { :git => "https://github.com/lucdion/FlexLayout.git", :tag => "#{spec.version}" }
spec.source_files = "Sources/**/*.{swift,h,m,mm,cpp,c}"
spec.public_header_files = "Sources/yoga/include/yoga/*.h", "Sources/YogaKit/include/YogaKit/*.h"
spec.public_header_files = "Sources/YogaKit/include/YogaKit/*.h"
spec.libraries = 'c++'

# Should match yoga_defs.bzl + BUCK configuration
Expand All @@ -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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
18 changes: 15 additions & 3 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: aaf305c1f3203be3d8694c3835773d1e7a912b72
PinLayout: f6c2b63a5a5b24864064e1d15c67de41b4e74748
SwiftLint: 3fe909719babe5537c552ee8181c0031392be933
Yoga: 73e3c7ca57e233ad32a1a265a8b55dcce6c4d529

PODFILE CHECKSUM: a0f152e938c551fd661bee3ffe26ccc6175f088b
PODFILE CHECKSUM: 616cb577f11ab8498737680dedeed47c6fae4b64

COCOAPODS: 1.14.3
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