Skip to content

Commit cf18f13

Browse files
committed
Merge branch 'main' into sdlc/sdk-update
# Conflicts: # app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt # app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt # app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt
2 parents 29cbcaf + ef6714f commit cf18f13

File tree

266 files changed

+5728
-1643
lines changed

Some content is hidden

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

266 files changed

+5728
-1643
lines changed

.github/actions/setup-android-build/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,5 @@ runs:
4444
- name: Install Fastlane
4545
shell: bash
4646
run: |
47-
gem install bundler:2.2.27
4847
bundle config path vendor/bundle
4948
bundle install --jobs 4 --retry 3

.github/label-pr.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
],
2424
"app:password-manager": [
2525
"app/",
26-
"cxf/"
26+
"cxf/",
27+
"testharness/"
2728
],
2829
"app:authenticator": [
2930
"authenticator/"

.github/workflows/_version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979

8080
- name: Check out repository
8181
if: ${{ !inputs.skip_checkout || false }}
82-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
82+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
8383
with:
8484
fetch-depth: 0
8585
persist-credentials: false

.github/workflows/build-authenticator.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
inputs: "${{ toJson(inputs) }}"
6060

6161
- name: Check out repo
62-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
62+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
6363
with:
6464
persist-credentials: false
6565

@@ -98,7 +98,6 @@ jobs:
9898

9999
- name: Install Fastlane
100100
run: |
101-
gem install bundler:2.2.27
102101
bundle config path vendor/bundle
103102
bundle install --jobs 4 --retry 3
104103
@@ -123,7 +122,7 @@ jobs:
123122

124123
steps:
125124
- name: Check out repo
126-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
125+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
127126
with:
128127
persist-credentials: false
129128

@@ -134,7 +133,6 @@ jobs:
134133

135134
- name: Install Fastlane
136135
run: |
137-
gem install bundler:2.2.27
138136
bundle config path vendor/bundle
139137
bundle install --jobs 4 --retry 3
140138
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Build Test Harness
2+
3+
on:
4+
push:
5+
paths:
6+
- testharness/**
7+
workflow_dispatch:
8+
inputs:
9+
version-name:
10+
description: "Optional. Version string to use, in X.Y.Z format. Overrides default in the project."
11+
required: false
12+
type: string
13+
version-code:
14+
description: "Optional. Build number to use. Overrides default of GitHub run number."
15+
required: false
16+
type: number
17+
patch_version:
18+
description: "Order 999 - Overrides Patch version"
19+
type: boolean
20+
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
JAVA_VERSION: 21
24+
25+
permissions:
26+
contents: read
27+
packages: read
28+
29+
jobs:
30+
version:
31+
name: Calculate Version Name and Number
32+
uses: bitwarden/android/.github/workflows/_version.yml@main
33+
with:
34+
app_codename: "bwpm"
35+
base_version_number: 0
36+
version_name: ${{ inputs.version-name }}
37+
version_number: ${{ inputs.version-code }}
38+
patch_version: ${{ inputs.patch_version && '999' || '' }}
39+
40+
build:
41+
name: Build Test Harness
42+
runs-on: ubuntu-24.04
43+
needs: version
44+
45+
steps:
46+
- name: Log inputs to job summary
47+
uses: bitwarden/android/.github/actions/log-inputs@main
48+
with:
49+
inputs: "${{ toJson(inputs) }}"
50+
51+
- name: Check out repo
52+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
53+
with:
54+
persist-credentials: false
55+
56+
- name: Validate Gradle wrapper
57+
uses: gradle/actions/wrapper-validation@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
58+
59+
- name: Cache Gradle files
60+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
61+
with:
62+
path: |
63+
~/.gradle/caches
64+
~/.gradle/wrapper
65+
key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/libs.versions.toml') }}
66+
restore-keys: |
67+
${{ runner.os }}-gradle-v2-
68+
69+
- name: Cache build output
70+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
71+
with:
72+
path: |
73+
${{ github.workspace }}/build-cache
74+
key: ${{ runner.os }}-build-cache-${{ github.sha }}
75+
restore-keys: |
76+
${{ runner.os }}-build-
77+
78+
- name: Configure JDK
79+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
80+
with:
81+
distribution: "temurin"
82+
java-version: ${{ env.JAVA_VERSION }}
83+
84+
- name: Configure Ruby
85+
uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0
86+
with:
87+
bundler-cache: true
88+
89+
- name: Install Fastlane
90+
run: |
91+
gem install bundler:2.2.27
92+
bundle config path vendor/bundle
93+
bundle install --jobs 4 --retry 3
94+
95+
- name: Increment version
96+
env:
97+
DEFAULT_VERSION_CODE: ${{ github.run_number }}
98+
INPUT_VERSION_CODE: "${{ needs.version.outputs.version_number }}"
99+
INPUT_VERSION_NAME: ${{ needs.version.outputs.version_name }}
100+
run: |
101+
VERSION_CODE="${INPUT_VERSION_CODE:-$DEFAULT_VERSION_CODE}"
102+
VERSION_NAME_INPUT="${INPUT_VERSION_NAME:-}"
103+
bundle exec fastlane setBuildVersionInfo \
104+
versionCode:"$VERSION_CODE" \
105+
versionName:"$VERSION_NAME_INPUT"
106+
107+
regex='appVersionName = "(.+)"'
108+
if [[ "$(cat gradle/libs.versions.toml)" =~ $regex ]]; then
109+
VERSION_NAME="${BASH_REMATCH[1]}"
110+
fi
111+
echo "Version Name: ${VERSION_NAME}" >> "$GITHUB_STEP_SUMMARY"
112+
echo "Version Number: $VERSION_CODE" >> "$GITHUB_STEP_SUMMARY"
113+
114+
- name: Build Test Harness Debug APK
115+
run: ./gradlew :testharness:assembleDebug
116+
117+
- name: Upload Test Harness APK
118+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
119+
with:
120+
name: com.bitwarden.testharness.dev-debug.apk
121+
path: testharness/build/outputs/apk/debug/com.bitwarden.testharness.dev.apk
122+
if-no-files-found: error
123+
124+
- name: Create checksum for Test Harness APK
125+
run: |
126+
sha256sum "testharness/build/outputs/apk/debug/com.bitwarden.testharness.dev.apk" \
127+
> ./com.bitwarden.testharness.dev.apk-sha256.txt
128+
129+
- name: Upload Test Harness SHA file
130+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
131+
with:
132+
name: com.bitwarden.testharness.dev.apk-sha256.txt
133+
path: ./com.bitwarden.testharness.dev.apk-sha256.txt
134+
if-no-files-found: error

.github/workflows/build.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
inputs: "${{ toJson(inputs) }}"
6262

6363
- name: Check out repo
64-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
64+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
6565
with:
6666
persist-credentials: false
6767

@@ -100,7 +100,6 @@ jobs:
100100

101101
- name: Install Fastlane
102102
run: |
103-
gem install bundler:2.2.27
104103
bundle config path vendor/bundle
105104
bundle install --jobs 4 --retry 3
106105
@@ -132,7 +131,7 @@ jobs:
132131
artifact: ["apk", "aab"]
133132
steps:
134133
- name: Check out repo
135-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
134+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
136135
with:
137136
persist-credentials: false
138137

@@ -143,7 +142,6 @@ jobs:
143142

144143
- name: Install Fastlane
145144
run: |
146-
gem install bundler:2.2.27
147145
bundle config path vendor/bundle
148146
bundle install --jobs 4 --retry 3
149147
@@ -451,7 +449,7 @@ jobs:
451449
id-token: write
452450
steps:
453451
- name: Check out repo
454-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
452+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
455453
with:
456454
persist-credentials: false
457455

@@ -462,7 +460,6 @@ jobs:
462460

463461
- name: Install Fastlane
464462
run: |
465-
gem install bundler:2.2.27
466463
bundle config path vendor/bundle
467464
bundle install --jobs 4 --retry 3
468465

.github/workflows/cron-sync-google-priviledged-browsers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2525
with:
2626
persist-credentials: true
2727

.github/workflows/crowdin-pull.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@ on:
55
workflow_dispatch:
66
schedule:
77
- cron: "0 0 * * 5"
8+
9+
permissions: {}
810

911
jobs:
1012
crowdin-sync:
1113
name: Crowdin Pull - ${{ github.event_name }}
1214
runs-on: ubuntu-24.04
1315
permissions:
14-
contents: write
15-
pull-requests: write
16+
contents: read
1617
id-token: write
1718
steps:
1819
- name: Checkout repo
19-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2021
with:
2122
persist-credentials: false
2223

@@ -50,6 +51,8 @@ jobs:
5051
with:
5152
app-id: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-ID }}
5253
private-key: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-KEY }}
54+
permission-contents: write # for creating and pushing a new branch
55+
permission-pull-requests: write # for creating pull request
5356

5457
- name: Download translations
5558
uses: crowdin/github-action@0749939f635900a2521aa6aac7a3766642b2dc71 # v2.11.0

.github/workflows/crowdin-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
id-token: write
1717
steps:
1818
- name: Check out repo
19-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2020
with:
2121
persist-credentials: false
2222

.github/workflows/github-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Check out repository
28-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2929
with:
3030
fetch-depth: 0
3131
persist-credentials: true

0 commit comments

Comments
 (0)