Skip to content

Commit 5c002d7

Browse files
committed
Move xcodeproj into Xcode folder
1 parent 2a066a8 commit 5c002d7

29 files changed

+83
-79
lines changed

.swiftlint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ parent_config: https://raw.githubusercontent.com/Automattic/swiftlint-config/0f8
44
remote_timeout: 10.0
55

66
excluded:
7-
.build # `swift build` etc. output folder
7+
- .build # `swift build` etc. output folder
8+
- Xcode/DerivedData/**
89

910
opt_in_rules:
1011
- overridden_super_call

Podfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ def wordpresskit_pods
2222
pod 'UIDeviceIdentifier', '~> 2.0'
2323
end
2424

25+
workspace 'Xcode/WordPressKit.xcworkspace'
26+
project 'Xcode/WordPressKit.xcodeproj'
27+
2528
## WordPress Kit
2629
## =============
2730
##
2831
target 'WordPressKit' do
29-
project 'WordPressKit.xcodeproj'
3032
wordpresskit_pods
3133
end
3234

3335
target 'WordPressKitTests' do
34-
project 'WordPressKit.xcodeproj'
3536
wordpresskit_pods
3637

3738
pod 'OHHTTPStubs', '~> 9.0'

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ SPEC CHECKSUMS:
5454
WordPressShared: f93f99269258b46dad04f4e4dbf540ce2e5c1e66
5555
wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd
5656

57-
PODFILE CHECKSUM: 64af6d71574c7a92d01a9446aa874e066917ebe5
57+
PODFILE CHECKSUM: 73cfa652ae983aa3de16df0e749114d4fae67140
5858

5959
COCOAPODS: 1.15.2

Xcode/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SwiftLint Remote Config Cache
2+
.swiftlint/RemoteConfigCache

WordPressKit.xcodeproj/project.pbxproj renamed to Xcode/WordPressKit.xcodeproj/project.pbxproj

Lines changed: 40 additions & 70 deletions
Large diffs are not rendered by default.

WordPressKit.xcodeproj/xcshareddata/xcschemes/WordPressKit.xcscheme renamed to Xcode/WordPressKit.xcodeproj/xcshareddata/xcschemes/WordPressKit.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
codeCoverageEnabled = "YES">
3131
<TestPlans>
3232
<TestPlanReference
33-
reference = "container:Tests/WordPressKitTests/UnitTests.xctestplan"
33+
reference = "container:../Tests/WordPressKitTests/UnitTests.xctestplan"
3434
default = "YES">
3535
</TestPlanReference>
3636
</TestPlans>

WordPressKit.xcworkspace/contents.xcworkspacedata renamed to Xcode/WordPressKit.xcworkspace/contents.xcworkspacedata

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"originHash" : "f28a54e288718485642adbe7b780a05abf05f95f0f435b3f87b6d3684b95d268",
3+
"pins" : [
4+
{
5+
"identity" : "test-collector-swift",
6+
"kind" : "remoteSourceControl",
7+
"location" : "https://github.com/buildkite/test-collector-swift",
8+
"state" : {
9+
"revision" : "6e46839e1a4507ee047acd0896e29b9b278d9e3a",
10+
"version" : "0.4.0"
11+
}
12+
}
13+
],
14+
"version" : 3
15+
}

fastlane/Fastfile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,24 @@ SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS = '-skipPackagePluginValidation -skipM
88
platform :ios do
99
# "swift build" fails because of the UIKit dependency, so we need to validate the package via xcodebuild
1010
lane :package_build do
11-
scheme = 'WordPressKit'
11+
scheme = 'WordPressKit-Package'
12+
13+
# We need to explicitly step the derived data folder, otherwise we'll get errors like:
14+
# > Cannot find .xcresult in derived data which is needed to determine test results.
15+
derived_data_path = File.join(__dir__, '.build', 'derived-data')
1216

1317
xcodebuild(
1418
scheme:,
15-
xcargs: "-resolvePackageDependencies #{SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS}"
19+
xcargs: "-resolvePackageDependencies #{SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS} -derivedDataPath #{derived_data_path}"
1620
)
1721

1822
run_tests(
1923
package_path: '.',
2024
scheme:,
2125
device: 'iPhone 15',
2226
prelaunch_simulator: true,
23-
xcargs: SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS
27+
xcargs: SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS,
28+
derived_data_path:
2429
)
2530
end
2631

@@ -44,7 +49,14 @@ platform :ios do
4449

4550
desc 'Builds the project and runs tests'
4651
lane :test do
52+
derived_data_path = File.join(__dir__, '.build', 'derived-data')
53+
xcodebuild(
54+
workspace: File.join(__dir__, 'Xcode', 'WordPressKit.xcworkspace'),
55+
scheme: 'WordPressKit',
56+
xcargs: "-resolvePackageDependencies #{SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS} -derivedDataPath #{derived_data_path}"
57+
)
4758
run_tests(
59+
workspace: File.join(__dir__, 'Xcode', 'WordPressKit.xcworkspace'),
4860
scheme: 'WordPressKit',
4961
prelaunch_simulator: true,
5062
result_bundle: true,

0 commit comments

Comments
 (0)