Skip to content

Commit 7595036

Browse files
committed
Updating project settings and CI for Swift 5.
Removing —no-rdoc from gem command since it was deprecated. Removing —no-ri from gem command since it was deprecated. Adding swift version to rake commands to override project settings. Adding swift version to podspec.
1 parent fad8930 commit 7595036

7 files changed

Lines changed: 69 additions & 81 deletions

File tree

‎.travis.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@ branches:
55
- master
66

77
before_install:
8-
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
8+
- gem install xcpretty --no-document --quiet
99

1010
matrix:
1111
include:
1212
- osx_image: xcode9.1
13-
env: RAKETASK="ios[iOS StaticLib,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
13+
env: RAKETASK="ios[iOS StaticLib,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.0]"
1414
- osx_image: xcode9.1
15-
env: RAKETASK="ios[iOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
15+
env: RAKETASK="ios[iOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.0]"
1616
- osx_image: xcode9.1
17-
env: RAKETASK="osx[Mac Framework,x86_64,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
17+
env: RAKETASK="osx[Mac Framework,x86_64,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.0]"
1818
- osx_image: xcode9.1
19-
env: RAKETASK="tvos[tvOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
19+
env: RAKETASK="tvos[tvOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.0]"
2020
- osx_image: xcode10.1
21-
env: RAKETASK="ios[iOS StaticLib,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
21+
env: RAKETASK="ios[iOS StaticLib,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.2]"
2222
- osx_image: xcode10.1
23-
env: RAKETASK="ios[iOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
23+
env: RAKETASK="ios[iOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.2]"
2424
- osx_image: xcode10.1
25-
env: RAKETASK="tvos[tvOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
25+
env: RAKETASK="tvos[tvOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.2]"
2626
- osx_image: xcode10.1
27-
env: RAKETASK="osx[Mac Framework,x86_64,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
27+
env: RAKETASK="osx[Mac Framework,x86_64,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.2]"
2828
- osx_image: xcode10.2
2929
env: RAKETASK="ios[iOS StaticLib,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
3030
- osx_image: xcode10.2

‎Examples/Swift/MainViewController.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class MainViewController: UIViewController {
4343
self.installImageStubSwitch.isEnabled = sender.isOn
4444

4545
let state = sender.isOn ? "and enabled" : "but disabled"
46-
print("Installed (\(state)) stubs: \(OHHTTPStubs.allStubs)")
46+
print("Installed (\(state)) stubs: \(OHHTTPStubs.allStubs())")
4747
}
4848

4949

‎Examples/Swift/OHHTTPStubsDemo.xcodeproj/project.pbxproj‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,22 +144,23 @@
144144
isa = PBXProject;
145145
attributes = {
146146
LastSwiftUpdateCheck = 0700;
147-
LastUpgradeCheck = 1010;
147+
LastUpgradeCheck = 1020;
148148
ORGANIZATIONNAME = AliSoftware;
149149
TargetAttributes = {
150150
099F74061AE2D049001108A5 = {
151151
CreatedOnToolsVersion = 6.3;
152-
LastSwiftMigration = 0800;
152+
LastSwiftMigration = 1020;
153153
ProvisioningStyle = Manual;
154154
};
155155
};
156156
};
157157
buildConfigurationList = 099F74021AE2D049001108A5 /* Build configuration list for PBXProject "OHHTTPStubsDemo" */;
158158
compatibilityVersion = "Xcode 3.2";
159-
developmentRegion = English;
159+
developmentRegion = en;
160160
hasScannedForEncodings = 0;
161161
knownRegions = (
162162
en,
163+
Base,
163164
);
164165
mainGroup = 099F73FE1AE2D049001108A5;
165166
productRefGroup = 099F74081AE2D049001108A5 /* Products */;
@@ -243,6 +244,7 @@
243244
isa = XCBuildConfiguration;
244245
buildSettings = {
245246
ALWAYS_SEARCH_USER_PATHS = NO;
247+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
246248
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
247249
CLANG_CXX_LIBRARY = "libc++";
248250
CLANG_ENABLE_MODULES = YES;
@@ -291,7 +293,7 @@
291293
ONLY_ACTIVE_ARCH = YES;
292294
SDKROOT = iphoneos;
293295
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
294-
SWIFT_VERSION = 4.2;
296+
SWIFT_VERSION = 5.0;
295297
TARGETED_DEVICE_FAMILY = "1,2";
296298
};
297299
name = Debug;
@@ -300,6 +302,7 @@
300302
isa = XCBuildConfiguration;
301303
buildSettings = {
302304
ALWAYS_SEARCH_USER_PATHS = NO;
305+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
303306
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
304307
CLANG_CXX_LIBRARY = "libc++";
305308
CLANG_ENABLE_MODULES = YES;
@@ -340,7 +343,7 @@
340343
MTL_ENABLE_DEBUG_INFO = NO;
341344
SDKROOT = iphoneos;
342345
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
343-
SWIFT_VERSION = 4.2;
346+
SWIFT_VERSION = 5.0;
344347
TARGETED_DEVICE_FAMILY = "1,2";
345348
VALIDATE_PRODUCT = YES;
346349
};

‎Examples/Swift/OHHTTPStubsDemo.xcodeproj/xcshareddata/xcschemes/OHHTTPStubsDemo.xcscheme‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

‎Examples/Swift/Pods/Pods.xcodeproj/project.pbxproj‎

Lines changed: 46 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎OHHTTPStubs.podspec‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ Pod::Spec.new do |s|
3333
s.watchos.deployment_target = '2.0'
3434
s.tvos.deployment_target = '9.0'
3535

36-
s.default_subspec = 'Default'
36+
s.swift_version = '5.0'
3737

38+
s.default_subspec = 'Default'
3839
# Default subspec that includes the most commonly-used components
3940
s.subspec 'Default' do |default|
4041
default.dependency 'OHHTTPStubs/Core'

0 commit comments

Comments
 (0)