From ccf0e391878fcc145caba461d68b9686fe3c4d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20G=C3=BCnd=C3=BCz?= Date: Thu, 4 Apr 2019 17:09:03 +0200 Subject: [PATCH 1/6] Update SwiftPM manifest file to Swift 4.2+ --- Package.swift | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Package.swift b/Package.swift index 24182001..f996dd21 100644 --- a/Package.swift +++ b/Package.swift @@ -1,15 +1,16 @@ -// Copyright 2017 LinkedIn Corp. -// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -// swift-tools-version:3.1 - +// swift-tools-version:4.2 import PackageDescription let package = Package( - name: "LayoutKit" + name: "LayoutKit", + // platforms: [.iOS("8.0"), .macOS("10.10"), tvOS("9.0")], + products: [ + .library(name: "LayoutKit", targets: ["LayoutKit"]) + ], + targets: [ + .target( + name: "LayoutKit", + path: "Sources" + ) + ] ) From de9ff9c68bf2bb55f0daea5466e6c4dc00f1a56e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20G=C3=BCnd=C3=BCz?= Date: Thu, 4 Apr 2019 17:12:52 +0200 Subject: [PATCH 2/6] [README] Add section documenting installation via Accio --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e130008..4db831eb 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ We have found LayoutKit to be a useful tool, but you should be aware of what it ## Installation -LayoutKit can be installed with [CocoaPods](https://cocoapods.org/) or [Carthage](https://github.com/Carthage/Carthage). +LayoutKit can be installed with [CocoaPods](https://cocoapods.org/), [Carthage](https://github.com/Carthage/Carthage) or [Accio](https://github.com/JamitLabs/Accio). ### CocoaPods @@ -80,6 +80,25 @@ github "linkedin/LayoutKit" Then run `carthage update`. +### Accio + +Add this to your Package.swift: +```swift +.package(url: "https://github.com/AccioSupport/LayoutKit.git", .upToNextMajor(from: "")), +``` + +Next, add `LayoutKit` to your App targets dependencies like so: +```swift +.target( + name: "App", + dependencies: [ + "LayoutKit", + ] +), +``` + +Then run `accio update`. + ## Documentation Now you are ready to start [building UI](http://layoutkit.org/building-ui). From d6bebcb7295d18cb575d34ca63726c1f3b3bfc30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20G=C3=BCnd=C3=BCz?= Date: Thu, 4 Apr 2019 17:15:34 +0200 Subject: [PATCH 3/6] [README] Fix version reference in Accio installation section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4db831eb..5c8d0630 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Then run `carthage update`. Add this to your Package.swift: ```swift -.package(url: "https://github.com/AccioSupport/LayoutKit.git", .upToNextMajor(from: "")), +.package(url: "https://github.com/AccioSupport/LayoutKit.git", .upToNextMajor(from: "10.1.0")), ``` Next, add `LayoutKit` to your App targets dependencies like so: From 9bd6fad445d46874e2a4da2c67144a7f4352fa26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20G=C3=BCnd=C3=BCz?= Date: Thu, 4 Apr 2019 17:16:14 +0200 Subject: [PATCH 4/6] [README] Fix reference to wrong GitHub user in Accio section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c8d0630..c46dfdfa 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Then run `carthage update`. Add this to your Package.swift: ```swift -.package(url: "https://github.com/AccioSupport/LayoutKit.git", .upToNextMajor(from: "10.1.0")), +.package(url: "https://github.com/linkedin/LayoutKit.git", .upToNextMajor(from: "10.1.0")), ``` Next, add `LayoutKit` to your App targets dependencies like so: From 372bfe0397d9a73419373f33aaa78e58cb58db52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20G=C3=BCnd=C3=BCz?= Date: Thu, 4 Apr 2019 17:18:04 +0200 Subject: [PATCH 5/6] [Package.swift] Exclude ObjC support dir --- Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index f996dd21..649267fb 100644 --- a/Package.swift +++ b/Package.swift @@ -10,7 +10,8 @@ let package = Package( targets: [ .target( name: "LayoutKit", - path: "Sources" + path: "Sources", + exclude: ["Sources/ObjCSupport"] ) ] ) From 5d39e7e48d8c7d0a0ba8c8757b8d0ff79194205f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20G=C3=BCnd=C3=BCz?= Date: Thu, 4 Apr 2019 17:23:50 +0200 Subject: [PATCH 6/6] [Package.swift] Link to Swift-only file path Note that this is required due to SwiftPM returning an error stating: "error: target at 'Sources' contains mixed language source files; feature not supported" As Accio will use Carthage for building the project anywys, the contents of the `path` is actually not important. Currently there is no proper way of getting this to work with the current projects code structure. Please note though that when SwiftPM becomes part of Xcode (which will probably take at least another year), this projects code files should probably be clearly separated. E.g. (really) all ObjC files could be put into ObjCSupport. --- Package.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 649267fb..c2244038 100644 --- a/Package.swift +++ b/Package.swift @@ -10,8 +10,7 @@ let package = Package( targets: [ .target( name: "LayoutKit", - path: "Sources", - exclude: ["Sources/ObjCSupport"] + path: "Sources/Internal" ) ] )