From 37eac1a7748bfe55861e53f1aa2c1015f5f948d7 Mon Sep 17 00:00:00 2001 From: gaebel Date: Thu, 13 May 2021 19:47:51 +0200 Subject: [PATCH 1/8] chore(package): use Swift 5.4 toolchain --- Package.swift | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Package.swift b/Package.swift index 86735a6..78369df 100644 --- a/Package.swift +++ b/Package.swift @@ -1,13 +1,29 @@ -// swift-tools-version:5.1 +// swift-tools-version:5.4 import PackageDescription let package = Package( name: "DIKit", products: [ - .library(name: "DIKit", targets: ["DIKit"]), + .library( + name: "DIKit", + targets: ["DIKit"] + ), ], targets: [ - .target(name: "DIKit", dependencies: [], path: "DIKit/Sources"), - .testTarget(name: "DIKitTests", dependencies: ["DIKit"], path: "DIKit/Tests"), + .target( + name: "DIKit", + path: "DIKit/Sources", + exclude: [ + "Resources" + ] + ), + .testTarget( + name: "DIKitTests", + dependencies: ["DIKit"], + path: "DIKit/Tests", + exclude: [ + "Info.plist" + ] + ), ] ) From 4723b2c05078aa979fe625588c05a6112bfef8b7 Mon Sep 17 00:00:00 2001 From: gaebel Date: Thu, 13 May 2021 19:48:03 +0200 Subject: [PATCH 2/8] chore: update to finalized name --- DIKit/Sources/DIKitDSL.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DIKit/Sources/DIKitDSL.swift b/DIKit/Sources/DIKitDSL.swift index 8ba231c..da60483 100644 --- a/DIKit/Sources/DIKitDSL.swift +++ b/DIKit/Sources/DIKitDSL.swift @@ -7,7 +7,7 @@ // // Copyright © 2019 Ben John. All rights reserved. -@_functionBuilder +@resultBuilder public struct ModuleBuilder { public static func buildBlock(_ children: [ComponentProtocol]...) -> [ComponentProtocol] { children.flatMap { $0 } @@ -22,7 +22,7 @@ public func module(@ModuleBuilder makeChildren: () -> [ComponentProtocol]) -> De DependencyContainer { container in makeChildren().forEach { c in container.register(c) } } } -@_functionBuilder +@resultBuilder public struct ModulesBuilder { public static func buildBlock(_ children: DependencyContainer...) -> [DependencyContainer] { children.compactMap { $0 } From 530cb3cce915b267d6956266cefc057c1be42e80 Mon Sep 17 00:00:00 2001 From: gaebel Date: Thu, 13 May 2021 19:48:14 +0200 Subject: [PATCH 3/8] chore: bump version to 1.6.1 for release --- DIKit.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DIKit.podspec b/DIKit.podspec index 3867625..f7359bc 100644 --- a/DIKit.podspec +++ b/DIKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "DIKit" - s.version = "1.6.0" + s.version = "1.6.1" s.license = { :type => "MIT", :file => "LICENSE" } s.summary = "Dependency Injection Framework for Swift." @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.social_media_url = "http://twitter.com/benjohnde" s.platform = :ios, "9.0" - s.swift_version = "5.1" + s.swift_version = "5.4" s.source = { :git => "https://github.com/benjohnde/DIKit.git", :tag => "#{s.version}" } From aafee2ce400b1430d8cf3e70d7b376257a040450 Mon Sep 17 00:00:00 2001 From: gaebel Date: Thu, 13 May 2021 19:48:28 +0200 Subject: [PATCH 4/8] chore: update to recommended settings --- DIKit/DIKit.xcodeproj/project.pbxproj | 4 +++- DIKit/DIKit.xcodeproj/xcshareddata/xcschemes/DIKit.xcscheme | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DIKit/DIKit.xcodeproj/project.pbxproj b/DIKit/DIKit.xcodeproj/project.pbxproj index 7713fd4..a289f87 100644 --- a/DIKit/DIKit.xcodeproj/project.pbxproj +++ b/DIKit/DIKit.xcodeproj/project.pbxproj @@ -214,7 +214,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1100; + LastUpgradeCheck = 1250; ORGANIZATIONNAME = "Ben John"; TargetAttributes = { 4BD95D872008B1C8009CE38D = { @@ -371,6 +371,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -433,6 +434,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; diff --git a/DIKit/DIKit.xcodeproj/xcshareddata/xcschemes/DIKit.xcscheme b/DIKit/DIKit.xcodeproj/xcshareddata/xcschemes/DIKit.xcscheme index ffb0c35..d3de70e 100644 --- a/DIKit/DIKit.xcodeproj/xcshareddata/xcschemes/DIKit.xcscheme +++ b/DIKit/DIKit.xcodeproj/xcshareddata/xcschemes/DIKit.xcscheme @@ -1,6 +1,6 @@ Date: Thu, 13 May 2021 19:48:37 +0200 Subject: [PATCH 5/8] refactor: remove unnecessary swiftlint disable --- DIKit/Tests/DIKitDSLTests.swift | 1 - DIKit/Tests/DependencyContainerTests.swift | 1 - DIKit/Tests/LazyInjectTests.swift | 1 - DIKit/Tests/OptionalInjectTests.swift | 1 - DIKit/Tests/TaggedComponentTests.swift | 1 - 5 files changed, 5 deletions(-) diff --git a/DIKit/Tests/DIKitDSLTests.swift b/DIKit/Tests/DIKitDSLTests.swift index c384357..3deb434 100644 --- a/DIKit/Tests/DIKitDSLTests.swift +++ b/DIKit/Tests/DIKitDSLTests.swift @@ -4,7 +4,6 @@ // Ben John // // - Date: 27.08.20 -// swiftlint:disable nesting // Copyright © 2020 Ben John. All rights reserved. import XCTest diff --git a/DIKit/Tests/DependencyContainerTests.swift b/DIKit/Tests/DependencyContainerTests.swift index 33bd779..a743c8f 100644 --- a/DIKit/Tests/DependencyContainerTests.swift +++ b/DIKit/Tests/DependencyContainerTests.swift @@ -4,7 +4,6 @@ // Ben John // // - Date: 27.08.20 -// swiftlint:disable nesting // Copyright © 2020 Ben John. All rights reserved. import XCTest diff --git a/DIKit/Tests/LazyInjectTests.swift b/DIKit/Tests/LazyInjectTests.swift index da31ab7..361c2fa 100644 --- a/DIKit/Tests/LazyInjectTests.swift +++ b/DIKit/Tests/LazyInjectTests.swift @@ -4,7 +4,6 @@ // Ben John // // - Date: 27.08.20 -// swiftlint:disable nesting // Copyright © 2020 Ben John. All rights reserved. import XCTest diff --git a/DIKit/Tests/OptionalInjectTests.swift b/DIKit/Tests/OptionalInjectTests.swift index f4893ec..7ffc1fe 100644 --- a/DIKit/Tests/OptionalInjectTests.swift +++ b/DIKit/Tests/OptionalInjectTests.swift @@ -4,7 +4,6 @@ // Ben John // // - Date: 27.08.20 -// swiftlint:disable nesting // Copyright © 2020 Ben John. All rights reserved. import XCTest diff --git a/DIKit/Tests/TaggedComponentTests.swift b/DIKit/Tests/TaggedComponentTests.swift index 60a8666..fd887e9 100644 --- a/DIKit/Tests/TaggedComponentTests.swift +++ b/DIKit/Tests/TaggedComponentTests.swift @@ -4,7 +4,6 @@ // Ben John // // - Date: 27.08.20 -// swiftlint:disable nesting // Copyright © 2020 Ben John. All rights reserved. import XCTest From 5937fe6b1478f8cb0f40d746d97c1b8cd3899cba Mon Sep 17 00:00:00 2001 From: gaebel Date: Thu, 13 May 2021 19:55:47 +0200 Subject: [PATCH 6/8] fix(workflow): remove action --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43b1f09..952cc9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,6 @@ jobs: name: Build & Test DIKit steps: - uses: actions/checkout@v1 - - uses: YOCKOW/Action-setup-swift@master - with: - swift-version: "5.2" - name: View Swift Version run: swift --version - name: Build From af3d6e7806fa7f133faa36196b4696df12a13e00 Mon Sep 17 00:00:00 2001 From: gaebel Date: Thu, 13 May 2021 19:56:21 +0200 Subject: [PATCH 7/8] chore: update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 242a2cf..4dc5094 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ We started small, it perfectly fits our use case. DIKit can be installed using [Carthage](https://github.com/Carthage/Carthage). After installing Carthage just add DIKit to your Cartfile: ```ogdl -github "Liftric/DIKit" ~> 1.6 +github "Liftric/DIKit" ~> 1.6.1 ``` ### Via CocoaPods @@ -22,7 +22,7 @@ github "Liftric/DIKit" ~> 1.6 ```ruby platform :ios, '9.0' -pod 'DIKit', '~> 1.6' +pod 'DIKit', '~> 1.6.1' ``` ## Basic usage From 4ebaee791968b1d737b3104a1ca8d138cf0d6b91 Mon Sep 17 00:00:00 2001 From: gaebel Date: Thu, 13 May 2021 20:07:35 +0200 Subject: [PATCH 8/8] fix(workflow): set Swift 5.4 version --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 952cc9b..fe7b185 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,9 @@ jobs: name: Build & Test DIKit steps: - uses: actions/checkout@v1 + - uses: fwal/setup-swift@v1 + with: + swift-version: "5.4" - name: View Swift Version run: swift --version - name: Build