Skip to content

Commit

Permalink
Merge pull request #20 from zenangst/swift5
Browse files Browse the repository at this point in the history
Swift 5
  • Loading branch information
zenangst authored May 20, 2019
2 parents 163e1d1 + 21519ce commit a097a0c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2
5.0
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
osx_image: xcode10
osx_image: xcode10.2
language: objective-c

script:
- set -o pipefail && xcodebuild -project Differific.xcodeproj -scheme "Differific-macOS" -sdk macosx clean build | xcpretty
- set -o pipefail && xcodebuild -project Differific.xcodeproj -scheme "Differific-macOS" -sdk macosx -enableCodeCoverage YES test | xcpretty
- set -o pipefail && xcodebuild -project Differific.xcodeproj -scheme "Differific-iOS" -sdk iphonesimulator -destination name="iPhone 8" clean build | xcpretty
- set -o pipefail && xcodebuild -project Differific.xcodeproj -scheme "Differific-iOS" -sdk iphonesimulator -destination name="iPhone 8" -enableCodeCoverage YES test | xcpretty
- set -o pipefail && xcodebuild -project Differific.xcodeproj -scheme "Differific-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV,OS=11.4' clean build | xcpretty
- set -o pipefail && xcodebuild -project Differific.xcodeproj -scheme "Differific-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV,OS=11.4' -enableCodeCoverage YES test | xcpretty
- set -o pipefail && xcodebuild -project Differific.xcodeproj -scheme "Differific-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV,OS=12.2' clean build | xcpretty
- set -o pipefail && xcodebuild -project Differific.xcodeproj -scheme "Differific-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV,OS=12.2' -enableCodeCoverage YES test | xcpretty

after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
2 changes: 1 addition & 1 deletion Differific.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Pod::Spec.new do |s|
s.tvos.source_files = 'Source/{iOS+tvOS,Shared}/**/*'
s.osx.source_files = 'Source/{macOS,Shared}/**/*'

s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '5.0' }
end
25 changes: 14 additions & 11 deletions Differific.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -497,26 +497,29 @@
};
D5B2E89E1C3A780C00C0327D = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
};
D5B2E8A81C3A780C00C0327D = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
};
D5C6293F1C3A7FAA007F7B7C = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 1020;
};
D5C629481C3A7FAA007F7B7C = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = D5B2E8991C3A780C00C0327D /* Build configuration list for PBXProject "Differific" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = D5B2E8951C3A780C00C0327D;
productRefGroup = D5B2E8A01C3A780C00C0327D /* Products */;
Expand Down Expand Up @@ -1001,7 +1004,7 @@
PRODUCT_NAME = Differific;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1021,7 +1024,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.zenangst.Differific-iOS";
PRODUCT_NAME = Differific;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -1036,7 +1039,7 @@
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.DifferificTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1050,7 +1053,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.DifferificTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -1074,7 +1077,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1097,7 +1100,7 @@
PRODUCT_NAME = Differific;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -1114,7 +1117,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Differific-MacTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1131,7 +1134,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Differific-MacTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Source/iOS+tvOS/UITableView+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public extension UITableView {
/// - before: A closure that will be invoked before the updates.
/// This is where you should update your data source.
/// - completion: A closure that is invoked after the updates are done.
public func reload<T: Hashable>(with changes: [Change<T>],
func reload<T: Hashable>(with changes: [Change<T>],
animation: UITableView.RowAnimation = .automatic,
section: Int = 0,
updateDataSource: (() -> Void),
Expand Down
4 changes: 3 additions & 1 deletion Tests/Shared/DiffManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class DiffManagerTests: XCTestCase {
struct MockObject: Hashable {
let id: Int
let name: String
var hashValue: Int { return id.hashValue }
func hash(into hasher: inout Hasher) {
hasher.combine(id.hashValue)
}
}

let manager = DiffManager()
Expand Down

0 comments on commit a097a0c

Please sign in to comment.