From bc0a938cafb2f6585d6ba51f5220006850f50056 Mon Sep 17 00:00:00 2001 From: ra1028 Date: Fri, 26 Jan 2024 19:52:05 +0900 Subject: [PATCH] Drop support for old xcode version --- .github/workflows/test.yml | 60 +++---- .swift-format | 3 - .swift-mod.yml | 18 -- .../PlaybookExample.xcodeproj/project.pbxproj | 100 +++++++++--- .../xcschemes/SamplePlaybook.xcscheme | 26 +-- .../Supporting Views/Badge.swift | 2 +- .../Supporting Views/HikeGraph.swift | 2 +- Example/project.yml | 18 +- Makefile | 17 +- Package.resolved | 149 +++++++++++++++++ Package.swift | 13 +- Playbook.xcodeproj/project.pbxproj | 154 +++++++++++++----- .../xcshareddata/xcschemes/Playbook.xcscheme | 31 ++-- .../xcschemes/PlaybookSnapshot.xcscheme | 17 +- .../xcschemes/PlaybookUI.xcscheme | 17 +- README.md | 4 +- .../FunctionBuilder/ScenariosBuilder.swift | 2 +- Sources/Playbook/Info.plist | 22 --- Sources/PlaybookSnapshot/Info.plist | 22 --- Sources/PlaybookUI/Info.plist | 22 --- Sources/PlaybookUI/Internal/Drawer.swift | 2 +- Tests/Info.plist | 22 --- Tests/SnapshotTests.swift | 5 +- Tools/Doc/Package.resolved | 124 -------------- Tools/Doc/Package.swift | 10 -- Tools/Package.resolved | 133 --------------- Tools/Package.swift | 11 -- project.yml | 70 ++++++++ 28 files changed, 507 insertions(+), 569 deletions(-) delete mode 100644 .swift-mod.yml create mode 100644 Package.resolved delete mode 100644 Sources/Playbook/Info.plist delete mode 100644 Sources/PlaybookSnapshot/Info.plist delete mode 100644 Sources/PlaybookUI/Info.plist delete mode 100644 Tests/Info.plist delete mode 100644 Tools/Doc/Package.resolved delete mode 100644 Tools/Doc/Package.swift delete mode 100644 Tools/Package.resolved delete mode 100644 Tools/Package.swift create mode 100644 project.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34d16df..c5a09bf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,59 +1,46 @@ -name: GitHub Actions +name: test on: pull_request: push: branches: - master + workflow_dispatch: + +env: + DEVELOPER_DIR: /Applications/Xcode_15.2.app + jobs: validation: name: Validation - runs-on: macos-11 - strategy: - matrix: - xcode_version: - - 12.5.1 - env: - DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app + runs-on: macos-13 steps: - uses: actions/checkout@v2 - - name: Get ruby gem cache - id: gem-cache - uses: actions/cache@v2 - with: - path: vendor/bundle - key: ${{ runner.os }}-1-gem-${{ hashFiles('Gemfile.lock') }} - restore-keys: ${{ runner.os }}-1-gem- - - - name: Install ruby gems - if: steps.gem-cache.cache.outputs.cache-hit != 'true' - run: make gem - - name: Get SwiftPM cache uses: actions/cache@v2 with: path: Tools/.build - key: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-${{ hashFiles('Tools/Package.resolved') }} - restore-keys: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm- + key: ${{ runner.os }}-0-spm-${{ hashFiles('Package.resolved') }} + restore-keys: ${{ runner.os }}-0-spm - - name: Podspec lint - run: make pod-lib-lint + - name: Validate format + run: | + make format + if [ -n "$(git status --porcelain)" ]; then echo "Make sure that the code is formated by 'make format'."; exit 1; fi + make lint + env: + SPM_FORCE_BUILD: 1 - - name: Validation - run: make all && [ -z "$(git status --porcelain)" ] && make lint + - name: Validate example project + run: | + make proj + if [ -n "$(git status --porcelain)" ]; then echo "Make sure that example project is formated by 'make proj'."; exit 1; fi env: SPM_FORCE_BUILD: 1 test: name: Test on macOS - runs-on: macos-11 - strategy: - matrix: - xcode_version: - - 11.7 - - 12.5.1 - env: - DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app + runs-on: macos-13 steps: - uses: actions/checkout@v2 - name: Show environments @@ -76,13 +63,12 @@ jobs: run: make npm - name: Test library & Generate snapshots - run: set -o pipefail && xcodebuild build-for-testing test-without-building -project Playbook.xcodeproj -scheme Playbook -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro' ENABLE_TESTABILITY=YES | xcpretty -c + run: set -o pipefail && xcodebuild test -scheme Playbook -destination 'platform=iOS Simulator,name=iPhone 15 Pro' | xcpretty -c - name: Generate snapshots of example app - run: set -o pipefail && xcodebuild build-for-testing test-without-building -project Example/PlaybookExample.xcodeproj -scheme SamplePlaybook -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro' ENABLE_TESTABILITY=YES | xcpretty -c + run: set -o pipefail && xcodebuild test -project Example/PlaybookExample.xcodeproj -scheme SamplePlaybook -destination 'platform=iOS Simulator,name=iPhone 15 Pro' | xcpretty -c - name: Visual regression test - if: matrix.xcode_version == '12.5.1' run: npx percy upload Snapshots env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} diff --git a/.swift-format b/.swift-format index 9bc5bcd..394ad6f 100644 --- a/.swift-format +++ b/.swift-format @@ -20,13 +20,11 @@ "AlwaysUseLowerCamelCase": false, "AmbiguousTrailingClosureOverload": true, "BeginDocumentationCommentWithOneLineSummary": true, - "BlankLineBetweenMembers": true, "DoNotUseSemicolons": true, "DontRepeatTypeInStaticProperties": true, "FullyIndirectEnum": true, "GroupNumericLiterals": true, "IdentifiersMustBeASCII": true, - "MultiLineTrailingCommas": true, "NeverForceUnwrap": false, "NeverUseForceTry": false, "NeverUseImplicitlyUnwrappedOptionals": true, @@ -43,7 +41,6 @@ "OnlyOneTrailingClosureArgument": true, "OrderedImports": true, "ReturnVoidInsteadOfEmptyTuple": true, - "UseEnumForNamespacing": true, "UseLetInEveryBoundCaseVariable": false, "UseShorthandTypeNames": true, "UseSingleLinePropertyGetter": true, diff --git a/.swift-mod.yml b/.swift-mod.yml deleted file mode 100644 index e532bf3..0000000 --- a/.swift-mod.yml +++ /dev/null @@ -1,18 +0,0 @@ -format: - indent: 4 - lineBreakBeforeEachArgument: true - -targets: - main: - paths: - - Sources - - Example/SampleComponent - rules: - defaultAccessLevel: - accessLevel: openOrPublic - implicitInternal: true - - defaultMemberwiseInitializer: - implicitInitializer: true - implicitInternal: true - ignoreClassesWithInheritance: true diff --git a/Example/PlaybookExample.xcodeproj/project.pbxproj b/Example/PlaybookExample.xcodeproj/project.pbxproj index c1c7ff9..082f568 100644 --- a/Example/PlaybookExample.xcodeproj/project.pbxproj +++ b/Example/PlaybookExample.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -196,7 +196,6 @@ 4261FFCE72EA7177DD8AAB04 /* ProfileSummary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileSummary.swift; sourceTree = ""; }; 484534BAAFC74B2B8E662666 /* HikeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HikeView.swift; sourceTree = ""; }; 48CE78CA3B34ACB43113D6E6 /* Data.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Data.swift; sourceTree = ""; }; - 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = project.xcconfig; sourceTree = ""; }; 54634E63D9F598E50BFEE94E /* SnapshotTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnapshotTests.swift; sourceTree = ""; }; 54A62FB73D841AF632775CDB /* chilkoottrail.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = chilkoottrail.jpg; sourceTree = ""; }; 5AE02FE9D07ABA0A8E18AA5F /* Home.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Home.swift; sourceTree = ""; }; @@ -326,7 +325,6 @@ 5FAFB2CEC43E1D2B7BCED896 /* SampleComponent */, 5F827EEB63647EAD64D384BD /* SamplePlaybook */, CB92B516E8A2C48AA06D141A /* SampleSnapshot */, - 4FDD44C5407F0BF7B47344B9 /* XCConfigs */, 47BBE7CCAFAEEB881D8EB70F /* Products */, 4BF238D518CAE916C182F0EF /* Projects */, ); @@ -359,15 +357,6 @@ name = Projects; sourceTree = ""; }; - 4FDD44C5407F0BF7B47344B9 /* XCConfigs */ = { - isa = PBXGroup; - children = ( - 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */, - ); - name = XCConfigs; - path = ../XCConfigs; - sourceTree = ""; - }; 5F827EEB63647EAD64D384BD /* SamplePlaybook */ = { isa = PBXGroup; children = ( @@ -565,7 +554,8 @@ E9CAE2938635D794AD227A39 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1200; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; TargetAttributes = { 86A8BD462FB3780C0C066E94 = { ProvisioningStyle = Manual; @@ -582,7 +572,7 @@ }; }; buildConfigurationList = FC8F3989ED6098B8FD993A7E /* Build configuration list for PBXProject "PlaybookExample" */; - compatibilityVersion = "Xcode 10.0"; + compatibilityVersion = "Xcode 14.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -797,85 +787,145 @@ /* Begin XCBuildConfiguration section */ 436175B2C36530DD53A5EF1F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = SampleComponent/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleComponent"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; }; 46005BBC60A067CB7CD55711 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = SampleSnapshot/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleSnapshot"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SamplePlaybook.app/SamplePlaybook"; }; name = Release; }; 610042B24C8993BD65811492 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; INFOPLIST_FILE = SamplePlaybook/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SamplePlaybook"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; 66320C81143949A6F15DAE68 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; INFOPLIST_FILE = SamplePlaybook/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SamplePlaybook"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; 6A3476962ED85A882B26595F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; INFOPLIST_FILE = SampleApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleApp"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; A2106F23C44C16947D8D78D9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = SampleComponent/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleComponent"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; }; AC22B532A4FE57295E8D32D7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = SampleSnapshot/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleSnapshot"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SamplePlaybook.app/SamplePlaybook"; }; name = Debug; }; AD279754F095EFB0099A6E6A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; INFOPLIST_FILE = SampleApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleApp"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; @@ -912,6 +962,9 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -975,6 +1028,9 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; diff --git a/Example/PlaybookExample.xcodeproj/xcshareddata/xcschemes/SamplePlaybook.xcscheme b/Example/PlaybookExample.xcodeproj/xcshareddata/xcschemes/SamplePlaybook.xcscheme index 98e1b98..643bb67 100644 --- a/Example/PlaybookExample.xcodeproj/xcshareddata/xcschemes/SamplePlaybook.xcscheme +++ b/Example/PlaybookExample.xcodeproj/xcshareddata/xcschemes/SamplePlaybook.xcscheme @@ -1,7 +1,7 @@ + LastUpgradeVersion = "1430" + version = "1.7"> + shouldUseLaunchSchemeArgsEnv = "NO" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + + + @@ -41,15 +50,6 @@ - - - - + LastUpgradeVersion = "1430" + version = "1.7"> + shouldUseLaunchSchemeArgsEnv = "NO" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + + + @@ -69,15 +78,6 @@ - - - - - + - + diff --git a/Playbook.xcodeproj/xcshareddata/xcschemes/PlaybookSnapshot.xcscheme b/Playbook.xcodeproj/xcshareddata/xcschemes/PlaybookSnapshot.xcscheme index 81e0caf..dd597f8 100644 --- a/Playbook.xcodeproj/xcshareddata/xcschemes/PlaybookSnapshot.xcscheme +++ b/Playbook.xcodeproj/xcshareddata/xcschemes/PlaybookSnapshot.xcscheme @@ -1,7 +1,7 @@ + LastUpgradeVersion = "1430" + version = "1.7"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + - + - + diff --git a/Playbook.xcodeproj/xcshareddata/xcschemes/PlaybookUI.xcscheme b/Playbook.xcodeproj/xcshareddata/xcschemes/PlaybookUI.xcscheme index 29a9476..6185554 100644 --- a/Playbook.xcodeproj/xcshareddata/xcschemes/PlaybookUI.xcscheme +++ b/Playbook.xcodeproj/xcshareddata/xcschemes/PlaybookUI.xcscheme @@ -1,7 +1,7 @@ + LastUpgradeVersion = "1430" + version = "1.7"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + - + - + diff --git a/README.md b/README.md index 6eed5ed..e48da1a 100644 --- a/README.md +++ b/README.md @@ -179,8 +179,8 @@ The generated snapshot images can be used for more advanced visual regression te ## Requirements -- Swift 5.1+ -- Xcode 11.0+ +- Swift 5.9+ +- Xcode 15.0+ - iOS 13.0+ --- diff --git a/Sources/Playbook/FunctionBuilder/ScenariosBuilder.swift b/Sources/Playbook/FunctionBuilder/ScenariosBuilder.swift index f3b7c48..047f4d6 100644 --- a/Sources/Playbook/FunctionBuilder/ScenariosBuilder.swift +++ b/Sources/Playbook/FunctionBuilder/ScenariosBuilder.swift @@ -1,5 +1,5 @@ /// The custom parameter attribute that constructs scenarios from multi-statement closures. -@_functionBuilder +@resultBuilder public struct ScenariosBuilder: ScenariosBuildable { private var _buildScenarios: () -> [Scenario] diff --git a/Sources/Playbook/Info.plist b/Sources/Playbook/Info.plist deleted file mode 100644 index 9bcb244..0000000 --- a/Sources/Playbook/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - - diff --git a/Sources/PlaybookSnapshot/Info.plist b/Sources/PlaybookSnapshot/Info.plist deleted file mode 100644 index 9bcb244..0000000 --- a/Sources/PlaybookSnapshot/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - - diff --git a/Sources/PlaybookUI/Info.plist b/Sources/PlaybookUI/Info.plist deleted file mode 100644 index 9bcb244..0000000 --- a/Sources/PlaybookUI/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - - diff --git a/Sources/PlaybookUI/Internal/Drawer.swift b/Sources/PlaybookUI/Internal/Drawer.swift index ab62ea2..fdbd9bd 100644 --- a/Sources/PlaybookUI/Internal/Drawer.swift +++ b/Sources/PlaybookUI/Internal/Drawer.swift @@ -62,7 +62,7 @@ private extension Drawer { var shadowRadius: CGFloat { 12 } - func withShadow(_ content: Content) -> some View { + func withShadow(_ content: some View) -> some View { content.shadow(color: Color.black.opacity(0.3), radius: shadowRadius) } diff --git a/Tests/Info.plist b/Tests/Info.plist deleted file mode 100644 index 64d65ca..0000000 --- a/Tests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Tests/SnapshotTests.swift b/Tests/SnapshotTests.swift index 05b2d7c..52cbf3a 100644 --- a/Tests/SnapshotTests.swift +++ b/Tests/SnapshotTests.swift @@ -3,6 +3,7 @@ import XCTest final class SnapshotTests: XCTestCase { func testTakeSnapshot() throws { + print("\(ProcessInfo.processInfo.environment)") guard let directory = ProcessInfo.processInfo.environment["SNAPSHOT_DIR"] else { fatalError("Set directory to the build environment variables with key `SNAPSHOT_DIR`.") } @@ -18,8 +19,8 @@ final class SnapshotTests: XCTestCase { keyWindow: UIApplication.shared.windows.first { $0.isKeyWindow }, devices: [ .iPhone11Pro(.portrait), - .iPhone11Pro(.landscape, style: .dark), - .iPhoneSE(.portrait, style: .dark), + .iPhone11Pro(.landscape).style(.dark), + .iPhoneSE(.portrait).style(.dark), .iPadPro12_9(.landscape), ], viewPreprocessor: { view in diff --git a/Tools/Doc/Package.resolved b/Tools/Doc/Package.resolved deleted file mode 100644 index d8680c7..0000000 --- a/Tools/Doc/Package.resolved +++ /dev/null @@ -1,124 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "CommonMark", - "repositoryURL": "https://github.com/SwiftDocOrg/CommonMark.git", - "state": { - "branch": null, - "revision": "92fa2fa2bf3c598f23da652e78c2d4b5bc4e35e9", - "version": "0.5.1" - } - }, - { - "package": "GraphViz", - "repositoryURL": "https://github.com/SwiftDocOrg/GraphViz.git", - "state": { - "branch": null, - "revision": "74b6cbd8c5ecea9f64d84c4e1c88d65604dd033f", - "version": "0.4.1" - } - }, - { - "package": "HypertextLiteral", - "repositoryURL": "https://github.com/NSHipster/HypertextLiteral.git", - "state": { - "branch": null, - "revision": "3993d13c1e1d72a2ab20316646b2d53a705b17d0", - "version": "0.0.3" - } - }, - { - "package": "Markup", - "repositoryURL": "https://github.com/SwiftDocOrg/Markup.git", - "state": { - "branch": null, - "revision": "029ad8c1115ab32b7c20ab52eb092fbc030deb17", - "version": "0.0.4" - } - }, - { - "package": "swift-argument-parser", - "repositoryURL": "https://github.com/apple/swift-argument-parser.git", - "state": { - "branch": null, - "revision": "9564d61b08a5335ae0a36f789a7d71493eacadfc", - "version": "0.3.2" - } - }, - { - "package": "cmark", - "repositoryURL": "https://github.com/SwiftDocOrg/swift-cmark.git", - "state": { - "branch": null, - "revision": "9c8096a23f44794bde297452d87c455fc4f76d42", - "version": "0.29.0+20210102.9c8096a" - } - }, - { - "package": "swift-doc", - "repositoryURL": "https://github.com/SwiftDocOrg/swift-doc.git", - "state": { - "branch": "1.0.0-rc.1", - "revision": "f935ebfe524a0ff27bda07dadc3662e3e45b5125", - "version": null - } - }, - { - "package": "swift-log", - "repositoryURL": "https://github.com/apple/swift-log.git", - "state": { - "branch": null, - "revision": "5d66f7ba25daf4f94100e7022febf3c75e37a6c7", - "version": "1.4.2" - } - }, - { - "package": "LoggingGitHubActions", - "repositoryURL": "https://github.com/NSHipster/swift-log-github-actions.git", - "state": { - "branch": null, - "revision": "13ce1e95e5b0c5fffa7667214d42e1f316693ef5", - "version": "0.0.1" - } - }, - { - "package": "SwiftSyntax", - "repositoryURL": "https://github.com/apple/swift-syntax.git", - "state": { - "branch": "release/5.4", - "revision": "d81b6a6dc2698a93dcc04304fb15a5446b5278a4", - "version": null - } - }, - { - "package": "SwiftMarkup", - "repositoryURL": "https://github.com/SwiftDocOrg/SwiftMarkup.git", - "state": { - "branch": null, - "revision": "bc71bde93b5217833c8ed13d5cf1e0c60f1367a7", - "version": "0.3.0" - } - }, - { - "package": "SwiftSemantics", - "repositoryURL": "https://github.com/SwiftDocOrg/SwiftSemantics.git", - "state": { - "branch": "0.3.0", - "revision": "2f571ccc67e0789d23f8adbccb6a18a6ff3b166c", - "version": null - } - }, - { - "package": "SwiftSyntaxHighlighter", - "repositoryURL": "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", - "state": { - "branch": "1.2.2", - "revision": "175923d005df00dc76c3c191bd7977c066a5288c", - "version": null - } - } - ] - }, - "version": 1 -} diff --git a/Tools/Doc/Package.swift b/Tools/Doc/Package.swift deleted file mode 100644 index 64ffb60..0000000 --- a/Tools/Doc/Package.swift +++ /dev/null @@ -1,10 +0,0 @@ -// swift-tools-version:5.3 - -import PackageDescription - -let package = Package( - name: "Doc", - dependencies: [ - .package(url: "https://github.com/SwiftDocOrg/swift-doc.git", .branch("1.0.0-rc.1")), - ] -) diff --git a/Tools/Package.resolved b/Tools/Package.resolved deleted file mode 100644 index 1a2f31f..0000000 --- a/Tools/Package.resolved +++ /dev/null @@ -1,133 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "AEXML", - "repositoryURL": "https://github.com/tadija/AEXML", - "state": { - "branch": null, - "revision": "8623e73b193386909566a9ca20203e33a09af142", - "version": "4.5.0" - } - }, - { - "package": "GraphViz", - "repositoryURL": "https://github.com/SwiftDocOrg/GraphViz.git", - "state": { - "branch": null, - "revision": "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", - "version": "0.2.0" - } - }, - { - "package": "JSONUtilities", - "repositoryURL": "https://github.com/yonaskolb/JSONUtilities.git", - "state": { - "branch": null, - "revision": "128d2ffc22467f69569ef8ff971683e2393191a0", - "version": "4.2.0" - } - }, - { - "package": "PathKit", - "repositoryURL": "https://github.com/kylef/PathKit.git", - "state": { - "branch": null, - "revision": "73f8e9dca9b7a3078cb79128217dc8f2e585a511", - "version": "1.0.0" - } - }, - { - "package": "Rainbow", - "repositoryURL": "https://github.com/onevcat/Rainbow.git", - "state": { - "branch": null, - "revision": "626c3d4b6b55354b4af3aa309f998fae9b31a3d9", - "version": "3.2.0" - } - }, - { - "package": "Spectre", - "repositoryURL": "https://github.com/kylef/Spectre.git", - "state": { - "branch": null, - "revision": "f79d4ecbf8bc4e1579fbd86c3e1d652fb6876c53", - "version": "0.9.2" - } - }, - { - "package": "swift-argument-parser", - "repositoryURL": "https://github.com/apple/swift-argument-parser.git", - "state": { - "branch": null, - "revision": "83b23d940471b313427da226196661856f6ba3e0", - "version": "0.4.4" - } - }, - { - "package": "swift-format", - "repositoryURL": "https://github.com/apple/swift-format.git", - "state": { - "branch": "0.50400.0", - "revision": "9c15831b798d767c9af0927a931de5d557004936", - "version": null - } - }, - { - "package": "SwiftSyntax", - "repositoryURL": "https://github.com/apple/swift-syntax", - "state": { - "branch": null, - "revision": "2fff9fc25cdc059379b6bd309377cfab45d8520c", - "version": "0.50400.0" - } - }, - { - "package": "SwiftCLI", - "repositoryURL": "https://github.com/jakeheis/SwiftCLI.git", - "state": { - "branch": null, - "revision": "2816678bcc37f4833d32abeddbdf5e757fa891d8", - "version": "6.0.2" - } - }, - { - "package": "Version", - "repositoryURL": "https://github.com/mxcl/Version", - "state": { - "branch": null, - "revision": "1fe824b80d89201652e7eca7c9252269a1d85e25", - "version": "2.0.1" - } - }, - { - "package": "XcodeGen", - "repositoryURL": "https://github.com/yonaskolb/XcodeGen.git", - "state": { - "branch": null, - "revision": "270ef8b27963b9fbfae3d02a253cc32a82f04ab1", - "version": "2.24.0" - } - }, - { - "package": "XcodeProj", - "repositoryURL": "https://github.com/tuist/XcodeProj.git", - "state": { - "branch": null, - "revision": "0b18c3e7a10c241323397a80cb445051f4494971", - "version": "8.0.0" - } - }, - { - "package": "Yams", - "repositoryURL": "https://github.com/jpsim/Yams.git", - "state": { - "branch": null, - "revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa", - "version": "4.0.6" - } - } - ] - }, - "version": 1 -} diff --git a/Tools/Package.swift b/Tools/Package.swift deleted file mode 100644 index 402b43e..0000000 --- a/Tools/Package.swift +++ /dev/null @@ -1,11 +0,0 @@ -// swift-tools-version:5.3 - -import PackageDescription - -let package = Package( - name: "Tools", - dependencies: [ - .package(url: "https://github.com/apple/swift-format.git", .branch("0.50400.0")), - .package(url: "https://github.com/yonaskolb/XcodeGen.git", .exact("2.24.0")), - ] -) diff --git a/project.yml b/project.yml new file mode 100644 index 0000000..6538b27 --- /dev/null +++ b/project.yml @@ -0,0 +1,70 @@ +name: Playbook +options: + bundleIdPrefix: app.playbook-ui + createIntermediateGroups: true + deploymentTarget: + iOS: 13.0 + +settings: + GENERATE_INFOPLIST_FILE: YES + CODE_SIGNING_REQUIRED: NO + CODE_SIGN_IDENTITY: "-" + CODE_SIGN_STYLE: Manual + +schemes: + Playbook: + build: + targets: + Playbook: all + PlaybookUI: [test] + PlaybookSnapshot: [test] + test: + targets: + - Playbook-Tests + commandLineArguments: + -AppleLanguages (en): true + environmentVariables: + SNAPSHOT_DIR: $(SOURCE_ROOT)/Snapshots + + PlaybookUI: + build: + targets: + PlaybookUI: all + + PlaybookSnapshot: + build: + targets: + PlaybookSnapshot: all + +targets: + Playbook: + type: framework + platform: iOS + sources: + - Sources/Playbook + + PlaybookUI: + type: framework + platform: iOS + sources: + - Sources/PlaybookUI + dependencies: + - target: Playbook + + PlaybookSnapshot: + type: framework + platform: iOS + sources: + - Sources/PlaybookSnapshot + dependencies: + - target: Playbook + + Playbook-Tests: + type: bundle.unit-test + platform: iOS + sources: + - Tests + dependencies: + - target: Playbook + - target: PlaybookUI + - target: PlaybookSnapshot