Upgrade to Swift 5

This commit is contained in:
Sindre Sorhus 2019-03-26 15:49:25 +07:00
parent 9b6b657f62
commit 908d3b4ee1
8 changed files with 24 additions and 16 deletions

View File

@ -1,3 +1,3 @@
language: swift language: swift
osx_image: xcode10 osx_image: xcode10.2
script: xcodebuild test -project Defaults.xcodeproj -scheme Defaults-macOS script: xcodebuild test -project Defaults.xcodeproj -scheme Defaults-macOS

View File

@ -8,7 +8,7 @@ Pod::Spec.new do |s|
s.authors = { 'Sindre Sorhus' => 'sindresorhus@gmail.com' } s.authors = { 'Sindre Sorhus' => 'sindresorhus@gmail.com' }
s.source = { :git => 'https://github.com/sindresorhus/Defaults.git', :tag => "v#{s.version}" } s.source = { :git => 'https://github.com/sindresorhus/Defaults.git', :tag => "v#{s.version}" }
s.source_files = 'Sources/*.swift' s.source_files = 'Sources/*.swift'
s.swift_version = '4.2' s.swift_version = '5'
s.macos.deployment_target = '10.12' s.macos.deployment_target = '10.12'
s.ios.deployment_target = '10.0' s.ios.deployment_target = '10.0'
s.tvos.deployment_target = '10.0' s.tvos.deployment_target = '10.0'

View File

@ -359,7 +359,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0720; LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0930; LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Defaults; ORGANIZATIONNAME = Defaults;
TargetAttributes = { TargetAttributes = {
52D6D97B1BEFF229002C0205 = { 52D6D97B1BEFF229002C0205 = {
@ -380,11 +380,11 @@
}; };
52D6DA0E1BF000BD002C0205 = { 52D6DA0E1BF000BD002C0205 = {
CreatedOnToolsVersion = 7.1; CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 1000; LastSwiftMigration = 1020;
}; };
DD7502791C68FCFC006590AF = { DD7502791C68FCFC006590AF = {
CreatedOnToolsVersion = 7.2.1; CreatedOnToolsVersion = 7.2.1;
LastSwiftMigration = 1000; LastSwiftMigration = 1020;
}; };
DD75028C1C690C7A006590AF = { DD75028C1C690C7A006590AF = {
CreatedOnToolsVersion = 7.2.1; CreatedOnToolsVersion = 7.2.1;
@ -394,10 +394,10 @@
}; };
buildConfigurationList = 52D6D9761BEFF229002C0205 /* Build configuration list for PBXProject "Defaults" */; buildConfigurationList = 52D6D9761BEFF229002C0205 /* Build configuration list for PBXProject "Defaults" */;
compatibilityVersion = "Xcode 10.0"; compatibilityVersion = "Xcode 10.0";
developmentRegion = English; developmentRegion = en;
hasScannedForEncodings = 0; hasScannedForEncodings = 0;
knownRegions = ( knownRegions = (
en, Base,
); );
mainGroup = 52D6D9721BEFF229002C0205; mainGroup = 52D6D9721BEFF229002C0205;
productRefGroup = 52D6D97D1BEFF229002C0205 /* Products */; productRefGroup = 52D6D97D1BEFF229002C0205 /* Products */;
@ -557,6 +557,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
@ -618,6 +619,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
@ -895,7 +897,7 @@
PRODUCT_NAME = Defaults; PRODUCT_NAME = Defaults;
SDKROOT = macosx; SDKROOT = macosx;
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2; SWIFT_VERSION = 5.0;
}; };
name = Debug; name = Debug;
}; };
@ -924,7 +926,7 @@
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_COMPILATION_MODE = wholemodule; SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 4.2; SWIFT_VERSION = 5.0;
}; };
name = Release; name = Release;
}; };
@ -942,7 +944,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.Defaults.Defaults-macOS-Tests"; PRODUCT_BUNDLE_IDENTIFIER = "com.Defaults.Defaults-macOS-Tests";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx; SDKROOT = macosx;
SWIFT_VERSION = 4.2; SWIFT_VERSION = 5.0;
}; };
name = Debug; name = Debug;
}; };
@ -962,7 +964,7 @@
SDKROOT = macosx; SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule; SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 4.2; SWIFT_VERSION = 5.0;
}; };
name = Release; name = Release;
}; };

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0930" LastUpgradeVersion = "1020"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0930" LastUpgradeVersion = "1020"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0930" LastUpgradeVersion = "1020"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0930" LastUpgradeVersion = "1020"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

View File

@ -1,8 +1,14 @@
// swift-tools-version:4.2 // swift-tools-version:5.0
import PackageDescription import PackageDescription
let package = Package( let package = Package(
name: "Defaults", name: "Defaults",
platforms: [
.macOS(.v10_12),
.iOS(.v10),
.tvOS(.v10),
.watchOS(.v3)
],
products: [ products: [
.library( .library(
name: "Defaults", name: "Defaults",