Skip to content

Commit c688ca2

Browse files
feat: Add PaymentExtension-to-Mono-Repo
1 parent 9c8b2b8 commit c688ca2

31 files changed

Lines changed: 2263 additions & 17 deletions

.github/workflows/build-kits.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,25 @@ jobs:
3737
- name: Pod Lib Lint
3838
run: |
3939
echo "Linting: ${{ matrix.kit.podspec }}"
40-
INCLUDES="mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec"
40+
INCLUDES=""
41+
if [ "${{ matrix.kit.pod_lint_standalone }}" != "true" ]; then
42+
INCLUDES="mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec"
43+
fi
4144
if [ -n "${{ matrix.kit.pod_lint_include_podspecs }}" ]; then
42-
INCLUDES="${INCLUDES},${{ matrix.kit.pod_lint_include_podspecs }}"
45+
if [ -n "$INCLUDES" ]; then
46+
INCLUDES="${INCLUDES},${{ matrix.kit.pod_lint_include_podspecs }}"
47+
else
48+
INCLUDES="${{ matrix.kit.pod_lint_include_podspecs }}"
49+
fi
50+
fi
51+
INCLUDE_ARGS=()
52+
if [ -n "$INCLUDES" ]; then
53+
INCLUDE_ARGS=(--include-podspecs="{${INCLUDES}}")
4354
fi
44-
INCLUDES="{${INCLUDES}}"
4555
for attempt in 1 2 3; do
4656
pod lib lint "${{ matrix.kit.podspec }}" \
4757
--allow-warnings \
48-
--include-podspecs="$INCLUDES" \
58+
"${INCLUDE_ARGS[@]}" \
4959
&& break
5060
[ $attempt -lt 3 ] && echo "Attempt $attempt failed, retrying in 60s..." && sleep 60 || exit 1
5161
done

.github/workflows/release-draft.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ jobs:
9494
Kits/rokt-sdk-plus/rokt-sdk-plus-ios/Sources/RoktSDKPlus/RoktSDKPlus.swift
9595
sed -i '' 's/^let version = "[^"]*"/let version = "'"${VERSION}"'"/' \
9696
Kits/rokt-sdk-plus/rokt-sdk-plus-ios/Package.swift
97+
sed -i '' 's/^let version = "[^"]*"/let version = "'"${VERSION}"'"/' \
98+
Kits/rokt-payment-extension/rokt-payment-extension-ios/Package.swift
9799
sed -i '' "s/kLibVersion = @\"[^\"]*\"/kLibVersion = @\"${VERSION}\"/" \
98100
Kits/clevertap/clevertap-7/Sources/mParticle-CleverTap/MPKitCleverTap.m
99101
sed -i '' "s/registerPluginName:@\"mParticleKit\" version:@\"[^\"]*\"/registerPluginName:@\"mParticleKit\" version:@\"${VERSION}\"/" \
@@ -166,7 +168,7 @@ jobs:
166168
- Kit source version strings (Rokt \`kMPRoktKitVersion\`, RoktSDKPlus \`RoktSDKPlus.version\`, CleverTap \`kLibVersion\`, Branch \`registerPluginName\`)
167169
- \`Framework/Info.plist\`
168170
- Integration test mappings
169-
- Kit \`Package.swift\`: \`let version\` for \`Kits/rokt-sdk-plus/rokt-sdk-plus-ios\` on every release; other kits’ \`let version\` only on **major** bumps (core SDK SPM pin)
171+
- Kit \`Package.swift\`: \`let version\` for \`Kits/rokt-sdk-plus/rokt-sdk-plus-ios\` and \`Kits/rokt-payment-extension/rokt-payment-extension-ios\` on every release; other kits’ \`let version\` only on **major** bumps (core SDK SPM pin)
170172
171173
---
172174

.github/workflows/release-publish.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,11 @@ jobs:
284284
id: push
285285
run: |
286286
DEST_URL="https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com/${{ env.DEST_ORG }}/${{ matrix.kit.dest_repo }}.git"
287-
git push "$DEST_URL" "split/${{ matrix.kit.name }}:main"
287+
if [ "${{ matrix.kit.mirror_force_push_main }}" = "true" ]; then
288+
git push --force "$DEST_URL" "split/${{ matrix.kit.name }}:main"
289+
else
290+
git push "$DEST_URL" "split/${{ matrix.kit.name }}:main"
291+
fi
288292
echo "sha=$(git rev-parse split/${{ matrix.kit.name }})" >> $GITHUB_OUTPUT
289293
290294
- name: Create GitHub release on mirror
@@ -389,6 +393,13 @@ jobs:
389393
. Scripts/pod_push.sh
390394
wait_for_pod_version_on_trunk mParticle-Rokt "$VERSION"
391395
396+
- name: Wait for RoktPaymentExtension on CocoaPods CDN (RoktSDKPlus)
397+
if: matrix.kit.name == 'rokt-sdk-plus-ios'
398+
run: |
399+
VERSION=$(head -n 1 VERSION | tr -d '\r\n ')
400+
. Scripts/pod_push.sh
401+
wait_for_pod_version_on_trunk RoktPaymentExtension "$VERSION"
402+
392403
- name: Publish to CocoaPods
393404
if: matrix.kit.podspec != ''
394405
env:

Kits/matrix.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,17 +393,37 @@
393393
}
394394
]
395395
},
396+
{
397+
"name": "rokt-payment-extension-ios",
398+
"local_path": "Kits/rokt-payment-extension/rokt-payment-extension-ios",
399+
"podspec": "Kits/rokt-payment-extension/rokt-payment-extension-ios/RoktPaymentExtension.podspec",
400+
"dest_repo": "rokt-payment-extension-ios",
401+
"dest_org": "ROKT",
402+
"mirror_force_push_main": true,
403+
"pod_lint_standalone": true,
404+
"spm_package_only": true,
405+
"skip_xcframework": true,
406+
"skip_example_builds": true,
407+
"schemes": [
408+
{
409+
"scheme": "RoktPaymentExtension",
410+
"module": "RoktPaymentExtension",
411+
"destination": "iOS"
412+
}
413+
]
414+
},
396415
{
397416
"name": "rokt-sdk-plus-ios",
398417
"local_path": "Kits/rokt-sdk-plus/rokt-sdk-plus-ios",
399418
"podspec": "Kits/rokt-sdk-plus/rokt-sdk-plus-ios/RoktSDKPlus.podspec",
400419
"dest_repo": "rokt-sdk-plus-ios",
401420
"dest_org": "ROKT",
421+
"mirror_force_push_main": true,
402422
"spm_package_only": true,
403423
"skip_xcframework": true,
404424
"skip_example_builds": true,
405425
"skip_spm_tests": true,
406-
"pod_lint_include_podspecs": "Kits/rokt/rokt/mParticle-Rokt.podspec",
426+
"pod_lint_include_podspecs": "Kits/rokt/rokt/mParticle-Rokt.podspec,Kits/rokt-payment-extension/rokt-payment-extension-ios/RoktPaymentExtension.podspec",
407427
"schemes": [
408428
{
409429
"scheme": "RoktSDKPlus",
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.DS_Store
2+
/.build
3+
Package.resolved
4+
/Packages
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/configuration/registries.json
8+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9+
.netrc
10+
.idea
11+
12+
# Xcode
13+
build/
14+
*.pbxuser
15+
!default.pbxuser
16+
*.mode1v3
17+
!default.mode1v3
18+
*.mode2v3
19+
!default.mode2v3
20+
*.perspectivev3
21+
!default.perspectivev3
22+
xcuserdata/
23+
*.xccheckout
24+
profile
25+
*.moved-aside
26+
DerivedData
27+
*.hmap
28+
*.ipa
29+
30+
# Bundler
31+
.bundle
32+
33+
# CocoaPods
34+
Pods/
35+
36+
aws/
37+
vendor/
38+
repositories
39+
checkouts
40+
workspace-state.json
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
default: true
3+
MD013: false
4+
MD040: false
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
--swiftversion 5.9
2+
--acronyms ID,URL,UUID
3+
--allman false
4+
--anonymousforeach convert
5+
--assetliterals visual-width
6+
--asynccapturing
7+
--beforemarks
8+
--binarygrouping none
9+
--callsiteparen default
10+
--categorymark "MARK: %c"
11+
--classthreshold 0
12+
--closingparen balanced
13+
--closurevoid remove
14+
--commas inline
15+
--complexattrs preserve
16+
--computedvarattrs preserve
17+
--condassignment after-property
18+
--conflictmarkers reject
19+
--dateformat system
20+
--decimalgrouping none
21+
--doccomments before-declarations
22+
--elseposition same-line
23+
--emptybraces no-space
24+
--enumnamespaces always
25+
--enumthreshold 0
26+
--exponentcase lowercase
27+
--exponentgrouping disabled
28+
--extensionacl on-extension
29+
--extensionlength 0
30+
--extensionmark "MARK: - %t + %c"
31+
--fractiongrouping disabled
32+
--fragment false
33+
--funcattributes preserve
34+
--generictypes
35+
--groupedextension "MARK: %c"
36+
--guardelse auto
37+
--header ignore
38+
--hexgrouping none
39+
--hexliteralcase uppercase
40+
--ifdef no-indent
41+
--importgrouping alpha
42+
--indent 4
43+
--indentcase false
44+
--indentstrings false
45+
--initcodernil false
46+
--lifecycle
47+
--lineaftermarks true
48+
--linebreaks lf
49+
--markcategories true
50+
--markextensions always
51+
--marktypes always
52+
53+
# Wrap lines that exceed the specified maximum width.
54+
--rules wrap
55+
--maxwidth 130
56+
57+
--modifierorder
58+
--nevertrailing
59+
--nilinit remove
60+
--noncomplexattrs
61+
--nospaceoperators ...,..<,/
62+
--nowrapoperators
63+
--octalgrouping none
64+
--onelineforeach ignore
65+
--operatorfunc spaced
66+
--organizationmode visibility
67+
--organizetypes actor,class,enum,struct
68+
--patternlet inline
69+
--ranges spaced
70+
--redundanttype infer-locals-only
71+
--self remove
72+
--selfrequired
73+
--semicolons never
74+
--shortoptionals except-properties
75+
--smarttabs enabled
76+
--someany true
77+
--storedvarattrs preserve
78+
--stripunusedargs closure-only
79+
--structthreshold 0
80+
--tabwidth unspecified
81+
--throwcapturing
82+
--timezone system
83+
--trailingclosures
84+
--trimwhitespace always
85+
--typeattributes preserve
86+
--typeblanklines remove
87+
--typedelimiter space-after
88+
--typemark "MARK: - %t"
89+
--voidtype void
90+
--wraparguments preserve
91+
--wrapcollections preserve
92+
--wrapconditions preserve
93+
--wrapeffects preserve
94+
--wrapenumcases always
95+
--wrapparameters default
96+
--wrapreturntype preserve
97+
--wrapternary default
98+
--wraptypealiases preserve
99+
--xcodeindentation disabled
100+
--yodaswap always
101+
--rules blankLinesAroundMark
102+
--rules isEmpty
103+
# Replace consecutive blank lines with a single blank line.
104+
--rules consecutiveBlankLines
105+
106+
# Replace consecutive spaces with a single space.
107+
--rules consecutiveSpaces
108+
--rules spaceAroundOperators
109+
--operatorfunc spaced
110+
111+
# Add or remove space around parentheses.
112+
--rules spaceAroundParens
113+
--rules spaceInsideParens
114+
115+
# Mark unused function arguments with _.
116+
--rules unusedArguments
117+
--stripunusedargs closure-only
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
disabled_rules:
3+
- identifier_name
4+
- force_cast
5+
- weak_delegate
6+
- function_parameter_count
7+
- file_length
8+
- type_body_length
9+
- cyclomatic_complexity
10+
- function_body_length
11+
12+
nesting:
13+
type_level:
14+
warning: 3
15+
error: 6
16+
17+
line_length:
18+
warning: 130
19+
error: 160
20+
ignores_comments: true
21+
ignores_urls: true
22+
23+
type_name:
24+
min_length: 1
25+
max_length: 40
26+
27+
excluded:
28+
- Tests
29+
- .build
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
truthy:
6+
check-keys: false
7+
document-start: disable
8+
line-length:
9+
max: 200
10+
comments:
11+
min-spaces-from-content: 1
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# License
2+
3+
Copyright 2024 Rokt Pte Ltd
4+
5+
Licensed under the Rokt Software Development Kit (SDK) Terms of Use
6+
Version 2.0 (the "License")
7+
8+
You may not use this file except in compliance with the License.
9+
10+
You may obtain a copy of the License at <https://rokt.com/sdk-license-2-0/>

0 commit comments

Comments
 (0)