Skip to content

Commit a3ed25d

Browse files
committed
Initial commit
0 parents  commit a3ed25d

File tree

292 files changed

+17549
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

292 files changed

+17549
-0
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
DerivedData
6+
/.swiftpm/

.swift-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.1

.swiftformat

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Rule configurations
2+
--allman false
3+
--binarygrouping 4,8
4+
--commas always
5+
--comments indent
6+
--decimalgrouping 3,5
7+
--elseposition same-line
8+
--empty void
9+
--exponentcase lowercase
10+
--exponentgrouping disabled
11+
--fractiongrouping enabled
12+
--header strip
13+
--hexgrouping none
14+
--hexliteralcase lowercase
15+
--ifdef noindent
16+
--indent 4
17+
--indentcase false
18+
--xcodeindentation enabled
19+
--linebreaks lf
20+
--octalgrouping 4,8
21+
--patternlet inline
22+
--self remove
23+
--semicolons inline
24+
--stripunusedargs closure-only
25+
--trimwhitespace always
26+
--wraparguments beforefirst
27+
--wrapcollections beforefirst
28+
--closingparen balanced
29+
--xcodeindentation enabled
30+
31+
# Disabled rules
32+
--disable numberFormatting
33+
--disable consecutiveBlankLines
34+
--disable andOperator
35+
--disable spaceAroundOperators
36+
--disable redundantReturn
37+
--disable blankLinesAtStartOfScope
38+
39+
# Enabled rules
40+
41+
# Tool options
42+
--symlinks ignore
43+
44+
# Excluded directories
45+
--exclude Carthage,.build,DerivedData

.swiftlint.yml

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
disabled_rules:
2+
- identifier_name # Does not make sense to lint for the length of identifiers.
3+
- type_name # Same as above.
4+
- empty_enum_arguments # It warns about an explicit pattern we use.
5+
- superfluous_disable_command # Disabled since we disable some rules pre-emptively to avoid issues in the future
6+
- todo # Temporarily disabled. We have too many right now hiding real issues :(
7+
- nesting # Does not make sense anymore since Swift 4 uses nested `CodingKeys` enums for example
8+
9+
opt_in_rules:
10+
- anyobject_protocol
11+
- attributes
12+
- closure_end_indentation
13+
- closure_spacing
14+
- collection_alignment
15+
- colon
16+
- contains_over_filter_count
17+
- contains_over_filter_is_empty
18+
- contains_over_first_not_nil
19+
- discouraged_object_literal
20+
- empty_collection_literal
21+
- empty_count
22+
- empty_string
23+
- explicit_init
24+
- extension_access_modifier
25+
- fatal_error_message
26+
- file_header
27+
- first_where
28+
- identical_operands
29+
- implicit_return
30+
- inert_defer
31+
- joined_default_parameter
32+
- literal_expression_end_indentation
33+
- legacy_hashing
34+
- legacy_random
35+
- multiline_arguments
36+
- multiline_literal_brackets
37+
- multiline_parameters
38+
- multiline_parameters_brackets
39+
- notification_center_detachment
40+
- number_separator
41+
- operator_usage_whitespace
42+
- overridden_super_call
43+
- private_action
44+
- prohibited_interface_builder
45+
- prohibited_super_call
46+
- redundant_nil_coalescing
47+
- redundant_objc_attribute
48+
- single_test_class
49+
- sorted_imports
50+
- static_operator
51+
- toggle_bool
52+
- trailing_comma
53+
- trailing_whitespace
54+
- unneeded_parentheses_in_closure_argument
55+
- vertical_parameter_alignment_on_call
56+
- yoda_condition
57+
58+
excluded:
59+
- .github/
60+
- .build/
61+
- build/
62+
- Carthage/
63+
- docs/
64+
- fastlane/
65+
- DerivedData/
66+
67+
attributes:
68+
always_on_same_line:
69+
- "@IBAction"
70+
- "@NSManaged"
71+
- "@objc"
72+
closure_spacing: warning
73+
empty_count:
74+
severity: warning
75+
implicit_return:
76+
included:
77+
- closure
78+
explicit_init: warning
79+
fatal_error_message: warning
80+
file_header:
81+
severity: warning
82+
forbidden_pattern: |
83+
\/\/
84+
\/\/ .*?\..*
85+
\/\/ .*
86+
\/\/
87+
\/\/ Created by .*? on .*\.
88+
\/\/ Copyright © \d{4} .*\. All rights reserved\.
89+
\/\/
90+
force_cast: warning
91+
force_try: warning
92+
implicit_getter: warning
93+
indentation: 4 # 4 spaces
94+
line_length:
95+
warning: 120
96+
error: 200
97+
ignores_function_declarations: true
98+
multiline_arguments:
99+
first_argument_location: next_line
100+
number_separator:
101+
minimum_length: 5 # number of digits, i.e. >= 10_000
102+
redundant_nil_coalescing: warning
103+
shorthand_operator: warning
104+
trailing_comma:
105+
mandatory_comma: true
106+
vertical_whitespace:
107+
max_empty_lines: 2
108+
weak_delegate: warning
109+
cyclomatic_complexity:
110+
warning: 12
111+
function_parameter_count:
112+
warning: 7
113+
114+
reporter:
115+
- "xcode"
116+
- "junit"
117+
118+
custom_rules:
119+
associated_values_unwrapping:
120+
name: "Associated Value Unwrapping"
121+
regex: "case let [a-zA-Z0-9]*.[a-zA-Z0-9]+\\([a-zA-Z0-9 ,]+"
122+
message: "Each associated value should be defined as a separate constant (i.e: .enumCase(let val1, let val2))"
123+
severity: warning
124+
trailing_dot_in_comments:
125+
name: "Trailing dot in comments"
126+
regex: '^[ ]*///?[^\n]*\.\n'
127+
message: "There shouldn't be trailing dot in comments"
128+
severity: warning

LICENSE

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2021 Spotify AB
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.

NOTICE

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
XCRemoteCache
2+
Copyright 2021 Spotify AB

Package.resolved

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "AEXML",
6+
"repositoryURL": "https://github.com/tadija/AEXML",
7+
"state": {
8+
"branch": null,
9+
"revision": "8623e73b193386909566a9ca20203e33a09af142",
10+
"version": "4.5.0"
11+
}
12+
},
13+
{
14+
"package": "PathKit",
15+
"repositoryURL": "https://github.com/kylef/PathKit",
16+
"state": {
17+
"branch": null,
18+
"revision": "73f8e9dca9b7a3078cb79128217dc8f2e585a511",
19+
"version": "1.0.0"
20+
}
21+
},
22+
{
23+
"package": "Spectre",
24+
"repositoryURL": "https://github.com/kylef/Spectre.git",
25+
"state": {
26+
"branch": null,
27+
"revision": "f79d4ecbf8bc4e1579fbd86c3e1d652fb6876c53",
28+
"version": "0.9.2"
29+
}
30+
},
31+
{
32+
"package": "swift-argument-parser",
33+
"repositoryURL": "https://github.com/apple/swift-argument-parser",
34+
"state": {
35+
"branch": null,
36+
"revision": "9f04d1ff1afbccd02279338a2c91e5f27c45e93a",
37+
"version": "0.0.5"
38+
}
39+
},
40+
{
41+
"package": "XcodeProj",
42+
"repositoryURL": "https://github.com/tuist/XcodeProj.git",
43+
"state": {
44+
"branch": null,
45+
"revision": "0b18c3e7a10c241323397a80cb445051f4494971",
46+
"version": "8.0.0"
47+
}
48+
},
49+
{
50+
"package": "Yams",
51+
"repositoryURL": "https://github.com/jpsim/Yams.git",
52+
"state": {
53+
"branch": null,
54+
"revision": "53741ba55ecca5c7149d8c9f810913ec80845c69",
55+
"version": "3.0.0"
56+
}
57+
},
58+
{
59+
"package": "Zip",
60+
"repositoryURL": "https://github.com/marmelroy/Zip.git",
61+
"state": {
62+
"branch": null,
63+
"revision": "80b1c3005ee25b4c7ce46c4029ac3347e8d5e37e",
64+
"version": "2.0.0"
65+
}
66+
}
67+
]
68+
},
69+
"version": 1
70+
}

Package.swift

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// swift-tools-version:5.1
2+
// The swift-tools-version declares the minimum version of Swift required to build this package
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "XCRemoteCache",
8+
platforms: [
9+
.macOS(.v10_14),
10+
],
11+
products: [
12+
.executable(name: "xcprebuild", targets: ["xcprebuild"]),
13+
],
14+
dependencies: [
15+
.package(url: "https://github.com/marmelroy/Zip.git", from: "2.0.0"),
16+
.package(url: "https://github.com/jpsim/Yams.git", from: "3.0.0"),
17+
.package(url: "https://github.com/apple/swift-argument-parser", from: "0.0.1"),
18+
.package(url: "https://github.com/tuist/XcodeProj.git", from: "8.0.0"),
19+
],
20+
targets: [
21+
.target(
22+
name: "XCRemoteCache",
23+
dependencies: ["Zip", "Yams", "XcodeProj"]
24+
),
25+
.target(
26+
name: "xcprebuild",
27+
dependencies: ["XCRemoteCache"]
28+
),
29+
.target(
30+
name: "xcswiftc",
31+
dependencies: ["XCRemoteCache"]
32+
),
33+
.target(
34+
name: "xclibtool",
35+
dependencies: ["XCRemoteCache"]
36+
),
37+
.target(
38+
name: "xcpostbuild",
39+
dependencies: ["XCRemoteCache"]
40+
),
41+
.target(
42+
name: "xcprepare",
43+
dependencies: [
44+
"XCRemoteCache",
45+
.product(name: "ArgumentParser", package: "swift-argument-parser"),
46+
]
47+
),
48+
.target(
49+
name: "xcld",
50+
dependencies: ["XCRemoteCache"]
51+
),
52+
.target(
53+
// Wrapper target that builds all binaries but does nothing in runtime
54+
name: "Aggregator",
55+
dependencies: ["xcprebuild", "xcswiftc", "xclibtool", "xcpostbuild", "xcprepare", "xcld"]
56+
),
57+
.testTarget(
58+
name: "XCRemoteCacheTests",
59+
dependencies: ["XCRemoteCache"]
60+
),
61+
]
62+
)

0 commit comments

Comments
 (0)