Skip to content

Commit cb90afe

Browse files
authored
chore: prepare 2.0.0 release (SDKCF-4382)
1 parent 2fc4ab6 commit cb90afe

11 files changed

+151
-24
lines changed

.jazzy.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
clean: true
2+
author: Rakuten Group, Inc.
3+
github_url: https://github.com/rakutentech/ios-sdkutils
4+
module_version: 2.0.0
5+
module: RSDKUtils
6+
xcodebuild_arguments:
7+
- -workspace
8+
- RSDKUtils.xcworkspace
9+
- -scheme
10+
- Tests
11+
podspec: RSDKUtils.podspec
12+
readme: README.md
13+
documentation: "*.md"
14+
hide_documentation_coverage: true

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# **Changelog**
2+
3+
#### 2.0.0 (2021-10-14)
4+
**Breaking change:** Removed obsolete utilities, separated source files into subspecs. Minimum supported iOS version is now 11.0
5+
- Features:
6+
- Added a lot of new utilities (including RLogger)
7+
- Added SPM support
8+
- Added Jazzy documentation (available at https://rakutentech.github.io/ios-sdkutils/)
9+
- Improvements:
10+
- Divided RSDKUtils into 4 subspecs and 4 SPM products - Main, TestHelpers, Nimble and RLogger
11+
- Added Bitrise CI
12+
13+
#### 1.1.0
14+
15+
- Add `KeyStore` class for securely storing values in the device KeyChain.
16+
17+
#### 1.0.0
18+
19+
- Initial release

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ gem "xcov", ">= 1.7.3", "< 2.0.0"
55
gem "danger"
66
gem "danger-xcov"
77
gem "xcode-install"
8+
gem "jazzy"

Podfile.lock

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
PODS:
22
- Nimble (9.2.1)
33
- Quick (4.0.0)
4-
- RSDKUtils (1.1.0):
5-
- RSDKUtils/Main (= 1.1.0)
6-
- RSDKUtils/Main (1.1.0):
4+
- RSDKUtils (2.0.0):
5+
- RSDKUtils/Main (= 2.0.0)
6+
- RSDKUtils/Main (2.0.0):
77
- RSDKUtils/RLogger
8-
- RSDKUtils/Nimble (1.1.0):
8+
- RSDKUtils/Nimble (2.0.0):
99
- Nimble
1010
- RSDKUtils/Main
11-
- RSDKUtils/RLogger (1.1.0)
12-
- RSDKUtils/TestHelpers (1.1.0):
11+
- RSDKUtils/RLogger (2.0.0)
12+
- RSDKUtils/TestHelpers (2.0.0):
1313
- RSDKUtils/Main
14+
- SwiftLint (0.44.0)
1415

1516
DEPENDENCIES:
1617
- Nimble
@@ -19,11 +20,13 @@ DEPENDENCIES:
1920
- RSDKUtils/Nimble (from `./RSDKUtils.podspec`)
2021
- RSDKUtils/RLogger (from `./RSDKUtils.podspec`)
2122
- RSDKUtils/TestHelpers (from `./RSDKUtils.podspec`)
23+
- SwiftLint
2224

2325
SPEC REPOS:
2426
trunk:
2527
- Nimble
2628
- Quick
29+
- SwiftLint
2730

2831
EXTERNAL SOURCES:
2932
RSDKUtils:
@@ -32,8 +35,9 @@ EXTERNAL SOURCES:
3235
SPEC CHECKSUMS:
3336
Nimble: e7e615c0335ee4bf5b0d786685451e62746117d5
3437
Quick: 6473349e43b9271a8d43839d9ba1c442ed1b7ac4
35-
RSDKUtils: 12929d76961f9c32b4d804e1c48b1ad043dc29fc
38+
RSDKUtils: 0b3f04097bffc8c95912e62aa5e009f26b03a4fb
39+
SwiftLint: e96c0a8c770c7ebbc4d36c55baf9096bb65c4584
3640

37-
PODFILE CHECKSUM: 3c322fcedad25411e0795e09b339e970a4256d9a
41+
PODFILE CHECKSUM: a764aa703c4858c50bdac374e7ffb09622de0025
3842

39-
COCOAPODS: 1.11.0
43+
COCOAPODS: 1.11.2

README.md

+69-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,78 @@
1+
![Build Status](https://app.bitrise.io/app/7bb2e98294cf2d27/status.svg?token=ISfEDlJWKck83OBeX4XaEQ&branch=master)
2+
3+
# RSDKUtils
14
## Rakuten's SDK Team internal utilities module
25

3-
#### Test SPM
4-
**WARNING:** Use RSDKUtils.xcworkspace to test this package. The following method is not available because of bug https://bugs.swift.org/browse/SR-13773
6+
RSDKUtils module contains useful utilities, extensions, and common classes used in SDK development.
7+
8+
RSDKUtils consists of 4 sub-modules:
9+
* *Main* - Contains the most common utilities for various purposes like networking, data storage, and standard class extensions.
10+
* *TestHelpers* - Contains useful mocks and XCTest extensions.
11+
* *Nimble* - Adds additional Nimble expectations like `toAfterTimeout`.
12+
* *RLogger* - A tool for managing your log messages.
13+
14+
This module supports iOS 11.0 and above. It has been tested with iOS 11.1 and above.
15+
16+
# **How to install**
17+
18+
## Installing with CocoaPods
19+
To use the module in its basic configuration your `Podfile` should contain:
20+
21+
```ruby
22+
# Defined also as 'RSDKUtils/Main'
23+
pod 'RSDKUtils', :git => '~> 2.0'
524
```
6-
swift package clean
7-
swift test -Xswiftc "-sdk" -Xswiftc `xcrun --sdk iphonesimulator --show-sdk-path` -Xswiftc "-target" -Xswiftc "x86_64-apple-ios14.5-simulator"
25+
26+
To use other functionalities, add their respective subspec to your `Podfile`:
27+
```ruby
28+
pod 'RSDKUtils/TestHelpers', '~> 2.0'
29+
pod 'RSDKUtils/Nimble', '~> 2.0'
30+
pod 'RSDKUtils/RLogger', '~> 2.0'
831
```
932

10-
### Changelog
33+
Run `pod install` to install the module.<br>
34+
More information on installing pods: [https://guides.cocoapods.org/using/getting-started.html](https://guides.cocoapods.org/using/getting-started.html)
1135

12-
#### 1.1.0
36+
## Installing with Swift Package Manager
37+
Open your project settings in Xcode and add a new package in 'Swift Packages' tab:
38+
* Repository URL: `https://github.com/rakutentech/ios-sdkutils.git`
39+
* Version settings: branch `master` or 2.0.0 "Up to Next Major"
1340

14-
- Add `KeyStore` class for securely storing values in the device KeyChain.
41+
Choose one of the following products for your target:
42+
* RSDKUtilsMain
43+
* RSDKUtilsTestHelpers
44+
* RSDKUtilsNimble
45+
* RLogger
1546

16-
#### 1.0.0
47+
# **Using the SDK**
48+
In order to use available utilities you need to add `import` statement in your source file:
49+
50+
### Installed with Cocoapods
51+
```swift
52+
import RSDKUtils
53+
```
1754

18-
- Initial release
55+
### Installed with SPM
56+
Depending on which product(s) you want to use, add one or more `import`:
57+
```swift
58+
import RSDKUtilsMain
59+
import RSDKUtilsNimble
60+
import RSDKUtilsTestHelpers
61+
import RLogger
62+
```
63+
64+
# **Testing the module**
65+
66+
You can test the module as a Swift Package and as a Cocoapod.
67+
68+
### Test Cococapod
69+
Run `pod install` then open RSDKUtils.xcworkspace and run `Tests` target.
70+
71+
### Test Swift Package
72+
Open `Package.swift` in Xcode, choose iOS Simulator and run `Tests` target.
73+
74+
⚠️ **WARNING:** Command-line testing is not available at the moment because of bug https://bugs.swift.org/browse/SR-13773
75+
```
76+
swift package clean
77+
swift test -Xswiftc "-sdk" -Xswiftc `xcrun --sdk iphonesimulator --show-sdk-path` -Xswiftc "-target" -Xswiftc "x86_64-apple-ios14.5-simulator"
78+
```

RSDKUtils.modulemap

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ framework module RSDKUtils {
44
export *
55
module * { export * }
66
}
7+

RSDKUtils.podspec

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "RSDKUtils"
3-
s.version = "1.1.0"
3+
s.version = "2.0.0"
44
s.authors = "Rakuten Ecosystem Mobile"
55
s.summary = "Rakuten's SDK Team internal utilities module."
66
s.homepage = "https://github.com/rakutentech/ios-sdkutils"
@@ -28,27 +28,28 @@ Pod::Spec.new do |s|
2828
s.default_subspec = 'Main'
2929

3030
s.subspec 'Main' do |ss|
31-
ss.source_files = "Sources/RSDKUtilsMain/**/*.{swift,m,h}"
32-
ss.public_header_files = "Sources/RSDKUtilsMain/*.h"
31+
ss.public_header_files = 'Sources/*.h'
32+
ss.source_files = 'Sources/RSDKUtilsMain/**/*.swift', 'Sources/*.h'
3333
ss.dependency 'RSDKUtils/RLogger'
3434
end
3535

3636
s.subspec 'TestHelpers' do |ss|
37-
ss.source_files = "Sources/RSDKUtilsTestHelpers/**/*.swift"
37+
ss.source_files = 'Sources/RSDKUtilsTestHelpers/**/*.swift'
3838
ss.weak_frameworks = [
3939
'XCTest'
4040
]
4141
ss.dependency 'RSDKUtils/Main'
4242
end
4343

4444
s.subspec 'Nimble' do |ss|
45-
ss.source_files = "Sources/RSDKUtilsNimble/**/*.swift"
45+
ss.source_files = 'Sources/RSDKUtilsNimble/**/*.swift'
4646
ss.dependency 'Nimble'
4747
ss.dependency 'RSDKUtils/Main'
4848
end
4949

5050
s.subspec 'RLogger' do |ss|
51-
ss.source_files = "Sources/RLogger/**/*.swift"
51+
ss.source_files = 'Sources/RLogger/**/*.swift', 'Sources/*.h'
52+
ss.public_header_files = 'Sources/*.h'
5253
end
5354
end
5455
# vim:syntax=ruby:et:sts=2:sw=2:ts=2:ff=unix:
File renamed without changes.

Tests/Tests/StandardHeaderSpec.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Foundation
12
import Quick
23
import Nimble
34
#if canImport(RSDKUtils)

Tests/Tests/UIColorExtensionsSpec.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Quick
22
import Nimble
3+
import UIKit
34
#if canImport(RSDKUtils)
45
@testable import RSDKUtils // Cocoapods version
56
#else

bitrise.yml

+25
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ trigger_map:
88
- pull_request_source_branch: "*"
99
workflow: primary
1010
workflows:
11+
1112
primary:
1213
before_run:
1314
- _setup
@@ -19,9 +20,12 @@ workflows:
1920
- update_fastlane: 'false'
2021
- lane: ci
2122
title: Build & Test
23+
2224
deploy:
2325
before_run:
2426
- _setup
27+
after_run:
28+
- _deploy_docs_worker
2529
steps:
2630
- script@1:
2731
title: Lint and push Cocoapods trunk
@@ -32,6 +36,12 @@ workflows:
3236
3337
bundle exec pod spec lint --allow-warnings
3438
bundle exec pod trunk push --allow-warnings --verbose
39+
40+
deploy_docs:
41+
before_run:
42+
- _setup
43+
- _deploy_docs_worker
44+
3545
_setup:
3646
steps:
3747
- git-clone@6:
@@ -58,6 +68,7 @@ workflows:
5868
- cache_enabled: 'yes'
5969
- upgrade: 'no'
6070
- packages: swiftlint
71+
6172
_report:
6273
steps:
6374
- danger@2:
@@ -86,6 +97,20 @@ workflows:
8697
done
8798
8899
bash codecov -J '^RSDKUtils$' -X gcov
100+
101+
_deploy_docs_worker:
102+
steps:
103+
- brew-install@0:
104+
title: Install svn
105+
inputs:
106+
- cache_enabled: 'yes'
107+
- upgrade: 'no'
108+
- packages: svn
109+
- fastlane@2:
110+
title: Generate and deploy Docs to Github Pages
111+
inputs:
112+
- update_fastlane: 'false'
113+
- lane: deploy_ghpages ghpages_url:$GIT_REPOSITORY_URL github_token:$PUBLISHER_GITHUB_API_TOKEN
89114
app:
90115
envs:
91116
- opts:

0 commit comments

Comments
 (0)