Skip to content

[chore]: bump minimum deployment & swift versions #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ jobs:
bundle exec pod gen Development.podspec

- name: Switch Xcode
run: sudo xcode-select -s /Applications/Xcode_13.3.1.app
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app

- name: Build & Test
run: |
set -o pipefail && xcodebuild -workspace gen/Development/Development.xcworkspace -scheme ${{ matrix.scheme }} -destination platform\=iOS\ Simulator,OS\=15.4,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
set -o pipefail && xcodebuild -workspace gen/Development/Development.xcworkspace -scheme ${{ matrix.scheme }} -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty

spm:
runs-on: macos-latest
Expand All @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v3

- name: Switch Xcode
run: sudo xcode-select -s /Applications/Xcode_13.3.1.app
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app

- name: Swift Package Manager - iOS
run: |
Expand All @@ -81,13 +81,13 @@ jobs:
bundle check || bundle install --path .bundle

- name: Switch Xcode
run: sudo xcode-select -s /Applications/Xcode_13.3.1.app
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app

- name: Tutorial App
run: |
cd Samples/Tutorial
bundle exec pod install
set -o pipefail && xcodebuild -workspace Tutorial.xcworkspace -scheme Tutorial -destination platform\=iOS\ Simulator,OS\=15.4,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
set -o pipefail && xcodebuild -workspace Tutorial.xcworkspace -scheme Tutorial -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty

documentation-lint:
runs-on: macos-latest
Expand All @@ -107,7 +107,7 @@ jobs:
brew install sourcedocs

- name: Switch Xcode
run: sudo xcode-select -s /Applications/Xcode_13.3.1.app
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app

- name: Swiftdocs
run: |
Expand Down
111 changes: 54 additions & 57 deletions Development.podspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require_relative('version')

Pod::Spec.new do |s|
s.name = 'Development'
s.version = '0.1.0'
Expand All @@ -7,14 +9,14 @@ Pod::Spec.new do |s|
s.author = 'Square'
s.source = { :git => 'https://github.com/square/workflow-swift.git', :tag => "v#{s.version}" }

s.ios.deployment_target = '11.0'
s.swift_version = '5.0'
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
s.swift_version = WORKFLOW_SWIFT_VERSION
s.dependency 'Workflow'
s.dependency 'WorkflowUI'
s.dependency 'WorkflowReactiveSwift'
s.dependency 'WorkflowRxSwift'
# s.dependency 'WorkflowCombine' # TODO: Disabled because app specs cannot increase the deployment target of the root
# s.dependency 'WorkflowConcurrency' # TODO: Disabled because app specs cannot increase the deployment target of the root
s.dependency 'WorkflowCombine'
s.dependency 'WorkflowConcurrency'
s.dependency 'ViewEnvironment'

s.source_files = 'Samples/Dummy.swift'
Expand Down Expand Up @@ -45,17 +47,14 @@ Pod::Spec.new do |s|
test_spec.source_files = 'WorkflowTesting/Tests/**/*.swift'
end

# TODO: Disabled because app specs cannot increase the deployment target of the root
# To use, increase the deployment target of this spec to 13.0 or higher
#
# s.app_spec 'SampleSwiftUIApp' do |app_spec|
# app_spec.ios.deployment_target = '13.0'
# app_spec.dependency 'WorkflowSwiftUI'
# app_spec.pod_target_xcconfig = {
# 'IFNFOPLIST_FILE' => '${PODS_ROOT}/../Samples/SampleSwiftUIApp/SampleSwiftUIApp/Configuration/Info.plist'
# }
# app_spec.source_files = 'SampleSwiftUIApp/SampleSwiftUIApp/**/*.swift'
# end
s.app_spec 'SampleSwiftUIApp' do |app_spec|
app_spec.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
app_spec.dependency 'WorkflowSwiftUI'
app_spec.pod_target_xcconfig = {
'IFNFOPLIST_FILE' => '${PODS_ROOT}/../Samples/SampleSwiftUIApp/SampleSwiftUIApp/Configuration/Info.plist'
}
app_spec.source_files = 'Samples/SampleSwiftUIApp/SampleSwiftUIApp/**/*.swift'
end

s.app_spec 'SampleTicTacToe' do |app_spec|
app_spec.source_files = 'Samples/TicTacToe/Sources/**/*.swift'
Expand Down Expand Up @@ -146,48 +145,46 @@ Pod::Spec.new do |s|
test_spec.dependency 'WorkflowRxSwiftTesting'
end

# TODO: Disabled because app specs cannot increase the deployment target of the root
# To use, increase the deployment target of this spec to 13.0 or higher
# s.app_spec 'WorkflowCombineSampleApp' do |app_spec|
# app_spec.source_files = 'Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/**/*.swift'
# end
#
# s.test_spec 'WorkflowCombineSampleAppTests' do |test_spec|
# test_spec.dependency 'Development/WorkflowCombineSampleApp'
# test_spec.dependency 'WorkflowTesting'
# test_spec.requires_app_host = true
# test_spec.app_host_name = 'Development/WorkflowCombineSampleApp'
# test_spec.source_files = 'Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/**/*.swift'
# end

# s.test_spec 'WorkflowCombineTests' do |test_spec|
# test_spec.requires_app_host = true
# test_spec.source_files = 'WorkflowCombine/Tests/**/*.swift'
# test_spec.framework = 'XCTest'
# test_spec.dependency 'WorkflowTesting'
# test_spec.dependency 'WorkflowCombineTesting'
# end

# s.test_spec 'WorkflowCombineTestingTests' do |test_spec|
# test_spec.requires_app_host = true
# test_spec.source_files = 'WorkflowCombine/TestingTests/**/*.swift'
# test_spec.framework = 'XCTest'
# test_spec.dependency 'WorkflowTesting'
# test_spec.dependency 'WorkflowCombineTesting'
# end
s.app_spec 'WorkflowCombineSampleApp' do |app_spec|
app_spec.source_files = 'Samples/WorkflowCombineSampleApp/WorkflowCombineSampleApp/**/*.swift'
end

s.test_spec 'WorkflowCombineSampleAppTests' do |test_spec|
test_spec.dependency 'Development/WorkflowCombineSampleApp'
test_spec.dependency 'WorkflowTesting'
test_spec.requires_app_host = true
test_spec.app_host_name = 'Development/WorkflowCombineSampleApp'
test_spec.source_files = 'Samples/WorkflowCombineSampleApp/WorkflowCombineSampleAppUnitTests/**/*.swift'
end

s.test_spec 'WorkflowCombineTests' do |test_spec|
test_spec.requires_app_host = true
test_spec.source_files = 'WorkflowCombine/Tests/**/*.swift'
test_spec.framework = 'XCTest'
test_spec.dependency 'WorkflowTesting'
test_spec.dependency 'WorkflowCombineTesting'
end

s.test_spec 'WorkflowCombineTestingTests' do |test_spec|
test_spec.requires_app_host = true
test_spec.source_files = 'WorkflowCombine/TestingTests/**/*.swift'
test_spec.framework = 'XCTest'
test_spec.dependency 'WorkflowTesting'
test_spec.dependency 'WorkflowCombineTesting'
end

# s.test_spec 'WorkflowConcurrencyTests' do |test_spec|
# test_spec.requires_app_host = true
# test_spec.source_files = 'WorkflowConcurrency/Tests/**/*.swift'
# test_spec.framework = 'XCTest'
# test_spec.dependency 'WorkflowTesting'
# end
s.test_spec 'WorkflowConcurrencyTests' do |test_spec|
test_spec.requires_app_host = true
test_spec.source_files = 'WorkflowConcurrency/Tests/**/*.swift'
test_spec.framework = 'XCTest'
test_spec.dependency 'WorkflowTesting'
end

# s.test_spec 'WorkflowConcurrencyTestingTests' do |test_spec|
# test_spec.requires_app_host = true
# test_spec.source_files = 'WorkflowConcurrency/TestingTests/**/*.swift'
# test_spec.framework = 'XCTest'
# test_spec.dependency 'WorkflowTesting'
# test_spec.dependency 'WorkflowConcurrencyTesting'
# end
s.test_spec 'WorkflowConcurrencyTestingTests' do |test_spec|
test_spec.requires_app_host = true
test_spec.source_files = 'WorkflowConcurrency/TestingTests/**/*.swift'
test_spec.framework = 'XCTest'
test_spec.dependency 'WorkflowTesting'
test_spec.dependency 'WorkflowConcurrencyTesting'
end
end
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ source 'https://rubygems.org'
gem 'cocoapods-trunk', '>=1.6.0'
gem 'cocoapods'

# Need it for Ruby 3.0 support and no release has happened yet
gem 'cocoapods-disable-podfile-validations', :git => 'https://github.com/segiddins/cocoapods-disable-podfile-validations.git', :ref => '55598d677fa995be496a47b810f4f9dce732b169'
gem 'cocoapods-generate'
13 changes: 3 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
GIT
remote: https://github.com/segiddins/cocoapods-disable-podfile-validations.git
revision: 55598d677fa995be496a47b810f4f9dce732b169
ref: 55598d677fa995be496a47b810f4f9dce732b169
specs:
cocoapods-disable-podfile-validations (0.1.1)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -52,9 +45,10 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-disable-podfile-validations (0.2.0)
cocoapods-downloader (1.6.3)
cocoapods-generate (2.2.2)
cocoapods-disable-podfile-validations (~> 0.1.1)
cocoapods-generate (2.2.3)
cocoapods-disable-podfile-validations (>= 0.1.1, < 0.3.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
Expand Down Expand Up @@ -101,7 +95,6 @@ PLATFORMS

DEPENDENCIES
cocoapods
cocoapods-disable-podfile-validations!
cocoapods-generate
cocoapods-trunk (>= 1.6.0)

Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// swift-tools-version:5.2
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Workflow",
platforms: [
.iOS("11.0"),
.iOS("14.0"),
.macOS("10.13"),
],
products: [
Expand Down Expand Up @@ -86,7 +86,7 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", from: "7.1.1"),
.package(url: "https://github.com/ReactiveX/RxSwift.git", from: "6.2.0"),
.package(url: "https://github.com/nicklockwood/SwiftFormat", .exact("0.44.14")),
.package(url: "https://github.com/nicklockwood/SwiftFormat", exact: "0.44.14"),
],
targets: [
// MARK: Workflow
Expand Down
4 changes: 2 additions & 2 deletions Samples/AlertContainer/AlertContainer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET

s.source_files = 'Sources/**/*.swift'

Expand Down
4 changes: 2 additions & 2 deletions Samples/BackStackContainer/BackStackContainer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET

s.source_files = 'Sources/**/*.{swift}'

Expand Down
4 changes: 2 additions & 2 deletions Samples/ModalContainer/ModalContainer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this change instead of repeating the value everywhere 👍


s.source_files = 'Sources/**/*.swift'

Expand Down
2 changes: 1 addition & 1 deletion Samples/SampleApp/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project 'SampleApp.xcodeproj'
platform :ios, '9.3'
platform :ios, '14.0'

target 'SampleApp' do
pod 'Workflow', path: '../../Workflow.podspec', :testspecs => ['Tests']
Expand Down
2 changes: 1 addition & 1 deletion Samples/SampleSwiftUIApp/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project 'SampleSwiftUIApp.xcodeproj'
platform :ios, '13'
platform :ios, '14.0'

target 'SampleSwiftUIApp' do
pod 'Workflow', path: '../../Workflow.podspec', :testspecs => ['Tests']
Expand Down
4 changes: 2 additions & 2 deletions Samples/SplitScreenContainer/SplitScreenContainer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET

s.source_files = 'Sources/**/*.swift'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET

s.source_files = 'Sources/**/*.swift'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET

s.source_files = 'Sources/**/*.swift'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET

s.source_files = 'Sources/**/*.swift'
s.resource_bundle = { 'TutorialResources' => ['Resources/**/*'] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET

s.source_files = 'Sources/**/*.swift'
s.resource_bundle = { 'TutorialResources' => ['Resources/**/*'] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET

s.source_files = 'Sources/**/*.swift'
s.resource_bundle = { 'TutorialResources' => ['Resources/**/*'] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET

s.source_files = 'Sources/**/*.swift'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
s.ios.deployment_target = '11.0'
s.swift_versions = [WORKFLOW_SWIFT_VERSION]
s.ios.deployment_target = WORKFLOW_IOS_DEPLOYMENT_TARGET

s.source_files = 'Sources/**/*.swift'
end
4 changes: 3 additions & 1 deletion Samples/Tutorial/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require_relative('../../version')

project 'Tutorial.xcodeproj'
platform :ios, '11.0'
platform :ios, WORKFLOW_IOS_DEPLOYMENT_TARGET

target 'Tutorial' do
pod 'Workflow', path: '../../Workflow.podspec', :testspecs => ['Tests']
Expand Down
Loading