Skip to content

Commit 1858f6c

Browse files
Release 0.0.4
Release 0.0.4
2 parents af76cea + fa4117f commit 1858f6c

36 files changed

Lines changed: 1541 additions & 448 deletions

.circleci/config.yml

Lines changed: 121 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
version: 2.1
22

33
orbs:
4-
android: circleci/android@1.0.3
4+
android: circleci/android@3.1.0
55

66
references:
77
workspace: &workspace
8-
~/code
9-
10-
## Docker configuration
11-
android_config: &android_config
12-
working_directory: *workspace
13-
docker:
14-
- image: circleci/android:api-28
15-
environment:
16-
- _JAVA_OPTIONS: "-XX:+UseContainerSupport"
17-
- JVM_OPTS: -Xmx3200m
18-
resource_class: large
8+
.
9+
10+
executor: &executor
11+
name: android/android_machine
12+
tag: default
1913

2014
## Cache
2115
gradle_key: &gradle_key
22-
jars-{{ checksum "build.gradle" }}
16+
jars-{{ checksum "build.gradle.kts" }}-{{ checksum "verify_sna/build.gradle.kts"}}
2317

2418
restore_gradle_cache: &restore_gradle_cache
2519
restore_cache:
@@ -31,19 +25,74 @@ references:
3125
paths:
3226
- ~/.gradle
3327

28+
commands:
29+
setup:
30+
steps:
31+
- checkout
32+
- restore_cache:
33+
key: v1-gems-{{ checksum "Gemfile.lock" }}
34+
- run:
35+
name: Install Gems
36+
command: bundle check || (bundle config set --local path 'vendor/bundle' && bundle install)
37+
- save_cache:
38+
key: v1-gems-{{ checksum "Gemfile.lock" }}
39+
paths:
40+
- vendor/bundle
41+
42+
signing_key:
43+
steps:
44+
- run:
45+
name: Install signing key
46+
command: echo $SIGNING_KEY | base64 -d >> $SIGNING_SECRET_KEY_RING_FILE
47+
48+
move_directory:
49+
parameters:
50+
from:
51+
description: Directory to move
52+
type: string
53+
to:
54+
description: Destination directory
55+
type: string
56+
steps:
57+
- run: cp -R <<parameters.from>> <<parameters.to>>
58+
3459
jobs:
35-
build_and_unit_test:
36-
<<: *android_config
60+
assemble:
61+
executor: *executor
62+
steps:
63+
- checkout
64+
- *restore_gradle_cache
65+
- run:
66+
name: Assembling the project
67+
command: ./gradlew assemble --no-daemon
68+
- *save_gradle_cache
69+
70+
unit_tests:
71+
executor: *executor
3772
steps:
73+
- setup
3874
- checkout
3975
- *restore_gradle_cache
4076
- run:
4177
name: Running Unit Tests
42-
command: ./gradlew verify_sna:test --no-daemon
78+
command: ./gradlew --no-daemon verify_sna:koverXmlReportDebug verify_sna:koverVerify
4379
- *save_gradle_cache
44-
80+
- store_artifacts:
81+
path: "verify_sna/build/reports/kover"
82+
destination: verify_sna_code_coverage
83+
- run: mkdir -p test-results
84+
- move_directory:
85+
from: verify_sna/build/test-results/testDebugUnitTest/
86+
to: test-results/verify_sna
87+
- store_test_results:
88+
path: "test-results"
89+
- run:
90+
name: Run the code coverage reporter
91+
command: |
92+
bundle exec danger --danger_id=code_coverage_report --dangerfile=dangerfiles/code_coverage_reporter
93+
4594
ktlint_check:
46-
<<: *android_config
95+
executor: *executor
4796
steps:
4897
- checkout
4998
- *restore_gradle_cache
@@ -52,10 +101,62 @@ jobs:
52101
command: ./gradlew ktlintCheck
53102
- *save_gradle_cache
54103

104+
size_report:
105+
executor: *executor
106+
steps:
107+
- checkout
108+
- *restore_gradle_cache
109+
- run:
110+
name: Generating Size Report
111+
command: ./gradlew :verify_sna:generateSizeReport
112+
- *save_gradle_cache
113+
- store_artifacts:
114+
path: "verify_sna/build/outputs/sizeReport"
115+
destination: sizeReport
116+
- run: mkdir -p builds
117+
- move_directory:
118+
from: verify_sna/build/outputs/sizeReport/
119+
to: builds
120+
- persist_to_workspace:
121+
root: *workspace
122+
paths:
123+
- builds
124+
125+
release:
126+
executor: *executor
127+
steps:
128+
- setup
129+
- checkout
130+
- *restore_gradle_cache
131+
- signing_key
132+
- run:
133+
name: Releasing the project
134+
command: bundle exec fastlane release
135+
- *save_gradle_cache
136+
55137
workflows:
56138
workflow:
57139
jobs:
58-
- ktlint_check
59-
- build_and_unit_test:
140+
- assemble
141+
- ktlint_check:
142+
requires:
143+
- assemble
144+
- unit_tests:
145+
context:
146+
- verify-sna
60147
requires:
61148
- ktlint_check
149+
- size_report:
150+
requires:
151+
- unit_tests
152+
- release:
153+
context:
154+
- verify-sna
155+
- verify-sna-android
156+
- verify-maven-publishing-android
157+
requires:
158+
- size_report
159+
filters:
160+
branches:
161+
only:
162+
- main

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
[*.{kt,kts}]
22
# possible values: number (e.g. 2), "unset" (makes ktlint ignore indentation completely)
33
indent_size=2
4+
5+
[*.{kt,kts}]
6+
ktlint_standard_trailing-comma-on-call-site = disabled
7+
ktlint_standard_trailing-comma-on-declaration-site = disabled
8+
ktlint_standard_multiline-expression-wrapping = disabled

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,13 @@
88
.externalNativeBuild
99
.cxx
1010
local.properties
11+
vendor/
12+
.bundle/
13+
*.gpg
14+
15+
# Fastlane
16+
fastlane/report.xml
17+
fastlane/Preview.html
18+
fastlane/screenshots
19+
fastlane/test_output
20+
fastlane/readme.md

Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source "https://rubygems.org"
2+
3+
gem "fastlane"
4+
gem "fastlane-plugin-semantic_convention_release"
5+
gem "danger", ">= 9.4.3"
6+
gem "danger-shroud", ">= 0.0.7"

0 commit comments

Comments
 (0)