-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Swift Package Manager Support (#99)
* removed tv-os targets as a Swift Package is platform independent. * added Package.swift * minor update to Package.swift * formatting * added all targets under a sources folder * added exclusion of info.plust * cleaned up warnings, updated to recommended projects settings, ensured tests pass locally. * removed exlude now that info plist is referenced correctly from within build settings. * updated circle.yml to support newer versions of iOS and removed unused framework * fixed linter issues * fixed bin/test in circleci.yml to reflect new schema names * made adjustments to schema naming to support test script. * ci doesn't support same simulator versions as locally so updating accordingly. * fixing import that is only an issue once the swift package is being built via SPM in another project. * added target dependency for Prelude in PreludeUI-UIKit target * corrected nesting of dependencies array in Package.swift * explicitly set enable_testing_search_paths to true even though compiler should link xctest with the import xctest statement. * added public access modifier to some UIKit Lens properties. * added public access modifier to dictionary property. * moved all test files into their own directory called Tests because they were inside Sources, which seems to run them when the app gets built. Also modified the Swift Package file to include a specific path to the tests. * added missing test file to test target * removed pre-existing test file from within directory folder. * updated the package libraries to link dynamicly explicitly. Trying to fix a runtime crash on devices in Kickstarter-iOS. * Revert "updated the package libraries to link dynamicly explicitly. Trying to fix a runtime crash on devices in Kickstarter-iOS." This reverts commit c9be257. * added iOS 15 navigation bar lens for appearance. * updated deployment target to iOS 13 for Prelude_UIKit only (from 12.0) * added availability tags to the new properties for iOS 13 navigation bar appearance. * removed webview lenses, updated min deploy version to 14, cleaned up warnings. * update ci * addressing linter comments * fixed some naming references to ReactiveExtensions * Test Prelude and Prelude-UIKit updates in makefile and ci file. * reference correction to ci file * more reference corrections * updated targets to use fewer targets, also set the min platform versions on the Package.swift file.
- Loading branch information
Showing
99 changed files
with
531 additions
and
1,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
version: 2.1 | ||
|
||
xcode_version: &xcode_version 14.2.0 | ||
iphone_name: &iphone_name iPhone 14 Pro Max | ||
preload_iphone_simulator: &preload_iphone_simulator xcrun instruments -w "iPhone 14 Pro Max (16.2) [" || true | ||
ipad_name: &ipad_name iPad Air (5th generation) | ||
preload_ipad_simulator: &preload_ipad_simulator xcrun instruments -w "iPad Air (5th generation) (16.2) [" || true | ||
|
||
# Templates | ||
|
||
iphone_default_environment: &iphone_default_environment | ||
CIRCLE_ARTIFACTS: /tmp | ||
BUNDLE_PATH: vendor/bundle | ||
FL_OUTPUT_DIR: output | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
IPHONE_NAME: *iphone_name | ||
XCODE_VERSION: *xcode_version | ||
PLATFORM: iOS | ||
|
||
ipad_default_environment: &ipad_default_environment | ||
CIRCLE_ARTIFACTS: /tmp | ||
BUNDLE_PATH: vendor/bundle | ||
FL_OUTPUT_DIR: output | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
IPHONE_NAME: *ipad_name | ||
XCODE_VERSION: *xcode_version | ||
PLATFORM: iOS | ||
|
||
base_job: &base_job | ||
macos: | ||
xcode: *xcode_version | ||
working_directory: ~/Prelude | ||
|
||
test_prelude_setup_job: &test_prelude_setup_job | ||
steps: | ||
- checkout | ||
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install swiftlint | ||
- run: set -o pipefail && | ||
swiftlint lint --strict --reporter json | | ||
tee $CIRCLE_ARTIFACTS/swiftlint-report.json | ||
- run: | ||
name: Store Xcode Version | ||
command: xcodebuild -version > xcode_version.txt | ||
- run: | ||
name: Pre-load iOS simulator | ||
command: *preload_iphone_simulator | ||
- run: | ||
name: Run Prelude-iOS Tests | ||
command: make test-prelude | ||
no_output_timeout: "20m" # 20 minutes | ||
- store_artifacts: | ||
name: Swiftlint Artifacts | ||
path: /tmp/swiftlint-report.json | ||
- store_artifacts: | ||
name: Xcode Artifacts | ||
path: /tmp/xcode_raw.log | ||
|
||
test_prelude_uikit_setup_job: &test_prelude_uikit_setup_job | ||
steps: | ||
- checkout | ||
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install swiftlint | ||
- run: set -o pipefail && | ||
swiftlint lint --strict --reporter json | | ||
tee $CIRCLE_ARTIFACTS/swiftlint-report.json | ||
- run: | ||
name: Store Xcode Version | ||
command: xcodebuild -version > xcode_version.txt | ||
- run: | ||
name: Pre-load iOS simulator | ||
command: *preload_ipad_simulator | ||
- run: | ||
name: Run Prelude-UIKit-iOS Tests | ||
command: make test-prelude-uikit | ||
no_output_timeout: "20m" # 20 minutes | ||
- store_artifacts: | ||
name: Swiftlint Artifacts | ||
path: /tmp/swiftlint-report.json | ||
- store_artifacts: | ||
name: Xcode Artifacts | ||
path: /tmp/xcode_raw.log | ||
|
||
# Jobs | ||
|
||
jobs: | ||
# Prelude-iOS tests | ||
prelude-ios-tests: | ||
<<: *base_job | ||
<<: *test_prelude_setup_job | ||
environment: | ||
- *iphone_default_environment | ||
- SCHEME=Prelude-iOS | ||
|
||
# Prelude-UIKit-iOS tests | ||
prelude-uikit-ios-tests: | ||
<<: *base_job | ||
<<: *test_prelude_uikit_setup_job | ||
environment: | ||
- *ipad_default_environment | ||
- SCHEME=Prelude-UIKit-iOS | ||
|
||
# Workflows | ||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- prelude-ios-tests | ||
- prelude-uikit-ios-tests | ||
|
||
experimental: | ||
notify: | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test-prelude: | ||
xcodebuild test -scheme Prelude-iOS -destination platform='iOS Simulator',name='iPhone 14 Pro Max',OS=16.2 | ||
test-prelude-uikit: | ||
xcodebuild test -scheme Prelude-UIKit-iOS -destination platform='iOS Simulator',name='iPad Air (5th generation)',OS=16.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// swift-tools-version:5.5 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Prelude", | ||
platforms: [ | ||
.iOS(.v14) | ||
], | ||
products: [ | ||
.library( | ||
name: "Prelude", | ||
targets: ["Prelude"] | ||
), | ||
.library( | ||
name: "Prelude_UIKit", | ||
targets: ["Prelude-UIKit"] | ||
) | ||
], | ||
targets: [ | ||
.target(name: "Prelude"), | ||
.testTarget( | ||
name: "PreludeTests", | ||
dependencies: ["Prelude"], | ||
path: "Tests/PreludeTests" | ||
), | ||
.target(name: "Prelude-UIKit", | ||
dependencies: ["Prelude"]), | ||
.testTarget( | ||
name: "Prelude-UIKitTests", | ||
dependencies: ["Prelude-UIKit"], | ||
path: "Tests/Prelude-UIKitTests" | ||
) | ||
] | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.