Skip to content

Commit a99164a

Browse files
David Rubinstein8W9aG
authored andcommitted
Initial commit
0 parents  commit a99164a

81 files changed

Lines changed: 228486 additions & 0 deletions

Some content is hidden

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

.circleci/config.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
version: 2
2+
jobs:
3+
buildlinuxclang:
4+
docker:
5+
- image: ubuntu:trusty
6+
steps:
7+
- checkout
8+
- run:
9+
name: Build Linux with clang
10+
command: USE_CURL=1 sh ci/linux.sh clang_build
11+
- store_artifacts:
12+
path: build/output/libNFHTTP.zip
13+
destination: libNFHTTP.zip
14+
buildlinuxgcc:
15+
docker:
16+
- image: ubuntu:trusty
17+
steps:
18+
- checkout
19+
- run:
20+
name: Build Linux with gcc
21+
command: USE_CURL=1 sh ci/linux.sh gcc_build
22+
- store_artifacts:
23+
path: build/output/libNFHTTP.zip
24+
destination: libNFHTTP.zip
25+
buildlinuxandroid:
26+
docker:
27+
- image: ubuntu:trusty
28+
steps:
29+
- checkout
30+
- run:
31+
name: Build Android
32+
command: BUILD_ANDROID=1 USE_CURL=1 sh ci/linux.sh build
33+
- store_artifacts:
34+
path: libNFHTTP-androidx86.zip
35+
destination: libNFHTTP-androidx86.zip
36+
- store_artifacts:
37+
path: libNFHTTP-androidArm64.zip
38+
destination: libNFHTTP-androidArm64.zip
39+
buildmac:
40+
macos:
41+
xcode: "9.0"
42+
steps:
43+
- checkout
44+
- run: git submodule sync
45+
- run: git submodule update --init --recursive
46+
- run:
47+
name: Build OSX
48+
command: USE_CURL=1 sh ci/osx.sh build
49+
- store_artifacts:
50+
path: build/output/libNFHTTP.zip
51+
destination: libNFHTTP.zip
52+
buildmacios:
53+
macos:
54+
xcode: "9.0"
55+
steps:
56+
- checkout
57+
- run: git submodule sync
58+
- run: git submodule update --init --recursive
59+
- run:
60+
name: Build iOS
61+
command: BUILD_IOS=1 USE_CURL=1 sh ci/osx.sh build
62+
- store_artifacts:
63+
path: build/output/libNFHTTP.zip
64+
destination: libNFHTTP.zip
65+
buildmacandroid:
66+
macos:
67+
xcode: "9.0"
68+
steps:
69+
- checkout
70+
- run: git submodule sync
71+
- run: git submodule update --init --recursive
72+
- run:
73+
name: Build Android
74+
command: BUILD_ANDROID=1 USE_CURL=1 sh ci/osx.sh build
75+
- store_artifacts:
76+
path: libNFHTTP-androidx86.zip
77+
destination: libNFHTTP-androidx86.zip
78+
- store_artifacts:
79+
path: libNFHTTP-androidArm64.zip
80+
destination: libNFHTTP-androidArm64.zip
81+
workflows:
82+
version: 2
83+
build:
84+
jobs:
85+
- buildlinuxclang
86+
- buildlinuxgcc
87+
- buildlinuxandroid
88+
- buildmac
89+
- buildmacios
90+
- buildmacandroid

.clang-format

Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
# This file was generated with clang-format 4.0.0
2+
# $ clang-format -style Google -dump-config > .clang-format
3+
#
4+
# Read all about the available options here:
5+
# http://releases.llvm.org/4.0.0/tools/clang/docs/ClangFormatStyleOptions.html
6+
#
7+
# Spotify specific tweaks:
8+
#
9+
# ---
10+
# Language: Cpp
11+
#
12+
# - Standard Auto -> Cpp11
13+
# A<A<int>> instead of A<A<int> >
14+
#
15+
# - ColumnLimit 80 -> 100
16+
# We allow up to 100 characters per line
17+
#
18+
# - PointerAlignment Left -> Right
19+
# Always put '*' and '&' close to variable/function
20+
# Guidelines allows both alignments, but we want right (for legacy reasons)
21+
#
22+
# - DerivePointerAlignment: true -> false
23+
# Always put '*' and '&' close to variable/function
24+
# Guidelines allows both alignments, but we want right (for legacy reasons)
25+
#
26+
# - AllowShortFunctionsOnASingleLine: All -> Inline
27+
# We don't want to put out of class function definitions on a single line.
28+
# Standard allows it, but we prefer to keep the oneliners for methods inside classes.
29+
#
30+
# - BinPackArguments: true -> false
31+
# A function declaration’s or function definition’s parameters will either all be on the same
32+
# line or will have one line each.
33+
# Guidelines allows both true and false, but we like false better so we prefer that.
34+
#
35+
# - BinPackParameters: true -> false
36+
# A function call’s arguments will either be all on the same line or will have one line each.
37+
# Guidelines allows both true and false, but we like false better so we prefer that.
38+
#
39+
# - ForEachMacros: Remove all listed macros
40+
# We don't use foreach macros so clang-format shouldn't special treat any keywords.
41+
#
42+
# - IncludeCategories:
43+
# Tweaked priorities to match our preferred order.
44+
#
45+
# - ObjCSpaceAfterProperty: false -> true
46+
# Matches Spotifys Objective-C coding style, see https://github.com/spotify/ios-style
47+
#
48+
# - ObjCSpaceBeforeProtocolList: false -> true
49+
# Matches Spotifys Objective-C coding style, see https://github.com/spotify/ios-style
50+
#
51+
# ---
52+
# Language: ObjC
53+
#
54+
# Hand tweaked config that aims to match Spotifys Objective-C coding style,
55+
# see https://github.com/spotify/ios-style.
56+
#
57+
---
58+
Language: Cpp
59+
# BasedOnStyle: Google
60+
AccessModifierOffset: -1
61+
AlignAfterOpenBracket: Align
62+
AlignConsecutiveAssignments: false
63+
AlignConsecutiveDeclarations: false
64+
AlignEscapedNewlinesLeft: true
65+
AlignOperands: true
66+
AlignTrailingComments: true
67+
AllowAllParametersOfDeclarationOnNextLine: true
68+
AllowShortBlocksOnASingleLine: false
69+
AllowShortCaseLabelsOnASingleLine: false
70+
AllowShortFunctionsOnASingleLine: Inline
71+
AllowShortIfStatementsOnASingleLine: true
72+
AllowShortLoopsOnASingleLine: true
73+
AlwaysBreakAfterDefinitionReturnType: None
74+
AlwaysBreakAfterReturnType: None
75+
AlwaysBreakBeforeMultilineStrings: true
76+
AlwaysBreakTemplateDeclarations: true
77+
BinPackArguments: false
78+
BinPackParameters: false
79+
# Note: BraceWrapping is ignored since BreakBeforeBraces isn't set to Custom
80+
BraceWrapping:
81+
AfterClass: false
82+
AfterControlStatement: false
83+
AfterEnum: false
84+
AfterFunction: false
85+
AfterNamespace: false
86+
AfterObjCDeclaration: false
87+
AfterStruct: false
88+
AfterUnion: false
89+
BeforeCatch: false
90+
BeforeElse: false
91+
IndentBraces: false
92+
BreakBeforeBinaryOperators: None
93+
BreakBeforeBraces: Attach
94+
BreakBeforeTernaryOperators: true
95+
BreakConstructorInitializersBeforeComma: false
96+
BreakAfterJavaFieldAnnotations: false
97+
BreakStringLiterals: true
98+
ColumnLimit: 100
99+
CommentPragmas: '^ IWYU pragma:'
100+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
101+
ConstructorInitializerIndentWidth: 4
102+
ContinuationIndentWidth: 4
103+
Cpp11BracedListStyle: true
104+
DerivePointerAlignment: false
105+
DisableFormat: false
106+
ExperimentalAutoDetectBinPacking: false
107+
ForEachMacros: []
108+
IncludeCategories:
109+
- Regex: '^<spotify/config/config.h>'
110+
Priority: 3
111+
- Regex: '^<spotify/.*>'
112+
Priority: 4
113+
- Regex: '^["<]base/.*.h[">]'
114+
Priority: 5
115+
- Regex: '^".*"'
116+
Priority: 6
117+
- Regex: '^<[a-z_]*>'
118+
Priority: 1
119+
- Regex: '^<.*>'
120+
Priority: 2
121+
IncludeIsMainRegex: '([-_](test|unittest))?$'
122+
IndentCaseLabels: true
123+
IndentWidth: 2
124+
IndentWrappedFunctionNames: false
125+
JavaScriptQuotes: Leave
126+
JavaScriptWrapImports: true
127+
KeepEmptyLinesAtTheStartOfBlocks: false
128+
MacroBlockBegin: ''
129+
MacroBlockEnd: ''
130+
MaxEmptyLinesToKeep: 1
131+
NamespaceIndentation: None
132+
ObjCBlockIndentWidth: 2
133+
ObjCSpaceAfterProperty: true
134+
ObjCSpaceBeforeProtocolList: true
135+
PenaltyBreakBeforeFirstCallParameter: 1
136+
PenaltyBreakComment: 300
137+
PenaltyBreakFirstLessLess: 120
138+
PenaltyBreakString: 1000
139+
PenaltyExcessCharacter: 1000000
140+
PenaltyReturnTypeOnItsOwnLine: 200
141+
PointerAlignment: Right
142+
ReflowComments: true
143+
SortIncludes: true
144+
SpaceAfterCStyleCast: false
145+
SpaceAfterTemplateKeyword: true
146+
SpaceBeforeAssignmentOperators: true
147+
SpaceBeforeParens: ControlStatements
148+
SpaceInEmptyParentheses: false
149+
SpacesBeforeTrailingComments: 2
150+
SpacesInAngles: false
151+
SpacesInCStyleCastParentheses: false
152+
SpacesInContainerLiterals: true
153+
SpacesInParentheses: false
154+
SpacesInSquareBrackets: false
155+
Standard: Cpp11
156+
TabWidth: 8
157+
UseTab: Never
158+
159+
#
160+
# Objective-C
161+
#
162+
---
163+
Language: ObjC
164+
# BasedOnStyle: Google
165+
AccessModifierOffset: -1
166+
AlignAfterOpenBracket: Align
167+
AlignConsecutiveAssignments: false
168+
AlignConsecutiveDeclarations: false
169+
AlignEscapedNewlinesLeft: true
170+
AlignOperands: true
171+
AlignTrailingComments: true
172+
AllowAllParametersOfDeclarationOnNextLine: true
173+
AllowShortBlocksOnASingleLine: false
174+
AllowShortCaseLabelsOnASingleLine: false
175+
AllowShortFunctionsOnASingleLine: false
176+
AllowShortIfStatementsOnASingleLine: false
177+
AllowShortLoopsOnASingleLine: false
178+
AlwaysBreakAfterDefinitionReturnType: None
179+
AlwaysBreakAfterReturnType: None
180+
AlwaysBreakBeforeMultilineStrings: true
181+
AlwaysBreakTemplateDeclarations: true
182+
BinPackArguments: false
183+
BinPackParameters: false
184+
BraceWrapping:
185+
AfterClass: false
186+
AfterControlStatement: false
187+
AfterEnum: false
188+
AfterFunction: true
189+
AfterNamespace: false
190+
AfterObjCDeclaration: false
191+
AfterStruct: false
192+
AfterUnion: false
193+
BeforeCatch: false
194+
BeforeElse: false
195+
IndentBraces: false
196+
BreakBeforeBinaryOperators: None
197+
BreakBeforeBraces: Custom
198+
BreakBeforeTernaryOperators: true
199+
BreakConstructorInitializersBeforeComma: false
200+
BreakAfterJavaFieldAnnotations: false
201+
BreakStringLiterals: true
202+
ColumnLimit: 120
203+
CommentPragmas: '^ IWYU pragma:'
204+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
205+
ConstructorInitializerIndentWidth: 4
206+
ContinuationIndentWidth: 4
207+
Cpp11BracedListStyle: true
208+
DerivePointerAlignment: false
209+
DisableFormat: false
210+
ExperimentalAutoDetectBinPacking: false
211+
ForEachMacros: []
212+
IncludeCategories:
213+
- Regex: '^<spotify/config/config.h>'
214+
Priority: 3
215+
- Regex: '^<spotify/.*>'
216+
Priority: 4
217+
- Regex: '^["<]base/.*.h[">]'
218+
Priority: 5
219+
- Regex: '^".*"'
220+
Priority: 6
221+
- Regex: '^<[a-z_]*>'
222+
Priority: 1
223+
- Regex: '^<.*>'
224+
Priority: 2
225+
IncludeIsMainRegex: '([-_](test|unittest))?$'
226+
IndentCaseLabels: true
227+
IndentWidth: 4
228+
IndentWrappedFunctionNames: false
229+
JavaScriptQuotes: Leave
230+
JavaScriptWrapImports: true
231+
KeepEmptyLinesAtTheStartOfBlocks: false
232+
MacroBlockBegin: ''
233+
MacroBlockEnd: ''
234+
MaxEmptyLinesToKeep: 1
235+
NamespaceIndentation: None
236+
ObjCBlockIndentWidth: 4
237+
ObjCSpaceAfterProperty: true
238+
ObjCSpaceBeforeProtocolList: true
239+
PenaltyBreakBeforeFirstCallParameter: 1
240+
PenaltyBreakComment: 300
241+
PenaltyBreakFirstLessLess: 120
242+
PenaltyBreakString: 1000
243+
PenaltyExcessCharacter: 1000000
244+
PenaltyReturnTypeOnItsOwnLine: 200
245+
PointerAlignment: Right
246+
ReflowComments: true
247+
SortIncludes: true
248+
SpaceAfterCStyleCast: false
249+
SpaceAfterTemplateKeyword: true
250+
SpaceBeforeAssignmentOperators: true
251+
SpaceBeforeParens: ControlStatements
252+
SpaceInEmptyParentheses: false
253+
SpacesBeforeTrailingComments: 2
254+
SpacesInAngles: false
255+
SpacesInCStyleCastParentheses: false
256+
SpacesInContainerLiterals: true
257+
SpacesInParentheses: false
258+
SpacesInSquareBrackets: false
259+
Standard: Cpp11
260+
TabWidth: 4
261+
UseTab: Never

0 commit comments

Comments
 (0)