Skip to content

Commit 51b4292

Browse files
Merge branch 'develop' into feature/aris/prevent_decryption_fom_suspend_functions
# Conflicts: # matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDecryptor.kt # matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt
2 parents 277619d + f5973fa commit 51b4292

File tree

1,424 files changed

+17973
-7647
lines changed

Some content is hidden

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

1,424 files changed

+17973
-7647
lines changed

.editorconfig

Lines changed: 901 additions & 14 deletions
Large diffs are not rendered by default.

.github/ISSUE_TEMPLATE/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ body:
1818
1919
- [ ] Weblate sync, fix lint issue if any (in a dedicated PR)
2020
- [ ] Check the update of the store descriptions (using Google Translate if necessary) to ensure that the changes are acceptable to be published to the stores.
21+
- [ ] While Weblate is locked, and after the PR from Weblate has been merged, handle all the TODOs in the main `strings.xml` file
2122
- [ ] Run the script `./tools/release/pushPlayStoreMetaData.sh`. You can check in the GooglePlay console the Activity log to check the effect.
2223
2324
### Do the release

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,17 @@
1717

1818
## Screenshots / GIFs
1919

20-
<!-- Only if UI have been changed -->
20+
<!-- Only if UI have been changed
21+
You can use a table like this to show screenshots comparison.
22+
Uncomment this markdown table below and edit the last line `|||`:
23+
|copy screenshot of before here|copy screenshot of after here|
24+
-->
25+
26+
<!--
27+
|Before|After|
28+
|-|-|
29+
|||
30+
-->
2131

2232
## Tests
2333

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
cancel-in-progress: true
2727
steps:
2828
- uses: actions/checkout@v3
29-
- uses: actions/cache@v2
29+
- uses: actions/cache@v3
3030
with:
3131
path: |
3232
~/.gradle/caches
@@ -37,7 +37,7 @@ jobs:
3737
- name: Assemble ${{ matrix.target }} debug apk
3838
run: ./gradlew assemble${{ matrix.target }}Debug $CI_GRADLE_ARG_PROPERTIES --stacktrace
3939
- name: Upload ${{ matrix.target }} debug APKs
40-
uses: actions/upload-artifact@v2
40+
uses: actions/upload-artifact@v3
4141
with:
4242
name: vector-${{ matrix.target }}-debug
4343
path: |
@@ -50,7 +50,7 @@ jobs:
5050
# Only runs on main, no concurrency.
5151
steps:
5252
- uses: actions/checkout@v3
53-
- uses: actions/cache@v2
53+
- uses: actions/cache@v3
5454
with:
5555
path: |
5656
~/.gradle/caches
@@ -61,7 +61,7 @@ jobs:
6161
- name: Assemble GPlay unsigned apk
6262
run: ./gradlew clean assembleGplayRelease $CI_GRADLE_ARG_PROPERTIES --stacktrace
6363
- name: Upload Gplay unsigned APKs
64-
uses: actions/upload-artifact@v2
64+
uses: actions/upload-artifact@v3
6565
with:
6666
name: vector-gplay-release-unsigned
6767
path: |

.github/workflows/nightly.yml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v3
2828
- uses: gradle/wrapper-validation-action@v1
29-
- uses: actions/setup-java@v2
29+
- uses: actions/setup-java@v3
3030
with:
3131
distribution: 'adopt'
3232
java-version: 11
3333
- name: Set up Python 3.8
3434
uses: actions/setup-python@v3
3535
with:
3636
python-version: 3.8
37-
- uses: actions/cache@v2
37+
- uses: actions/cache@v3
3838
with:
3939
path: |
4040
~/.gradle/caches
@@ -43,7 +43,7 @@ jobs:
4343
restore-keys: |
4444
${{ runner.os }}-gradle-
4545
- name: Start synapse server
46-
uses: michaelkaye/setup-matrix-synapse@v0.3.0
46+
uses: michaelkaye/setup-matrix-synapse@v1.0.1
4747
with:
4848
uploadLogs: true
4949
httpPort: 8080
@@ -174,15 +174,15 @@ jobs:
174174
# package: class PermalinkParserTest
175175
- name: Find Comment
176176
if: always() && github.event_name == 'pull_request'
177-
uses: peter-evans/find-comment@v1
177+
uses: peter-evans/find-comment@v2
178178
id: fc
179179
with:
180180
issue-number: ${{ github.event.pull_request.number }}
181181
comment-author: 'github-actions[bot]'
182182
body-includes: Integration Tests Results
183183
- name: Publish results to PR
184184
if: always() && github.event_name == 'pull_request'
185-
uses: peter-evans/create-or-update-comment@v1
185+
uses: peter-evans/create-or-update-comment@v2
186186
with:
187187
comment-id: ${{ steps.fc.outputs.comment-id }}
188188
issue-number: ${{ github.event.pull_request.number }}
@@ -196,7 +196,7 @@ jobs:
196196
- `[org.matrix.android.sdk.PermalinkParserTest]`<br>${{ steps.get-comment-body-permalink.outputs.permalink }}
197197
edit-mode: replace
198198
- name: Upload Test Report Log
199-
uses: actions/upload-artifact@v2
199+
uses: actions/upload-artifact@v3
200200
if: always()
201201
with:
202202
name: integrationtest-error-results
@@ -221,7 +221,7 @@ jobs:
221221
uses: actions/setup-python@v3
222222
with:
223223
python-version: 3.8
224-
- uses: actions/cache@v2
224+
- uses: actions/cache@v3
225225
with:
226226
path: |
227227
~/.gradle/caches
@@ -230,12 +230,12 @@ jobs:
230230
restore-keys: |
231231
${{ runner.os }}-gradle-
232232
- name: Start synapse server
233-
uses: michaelkaye/setup-matrix-synapse@v0.3.0
233+
uses: michaelkaye/setup-matrix-synapse@v1.0.1
234234
with:
235235
uploadLogs: true
236236
httpPort: 8080
237237
disableRateLimiting: true
238-
- uses: actions/setup-java@v2
238+
- uses: actions/setup-java@v3
239239
with:
240240
distribution: 'adopt'
241241
java-version: '11'
@@ -256,7 +256,7 @@ jobs:
256256
adb logcat >> emulator.log &
257257
./gradlew $CI_GRADLE_ARG_PROPERTIES connectedGplayDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=im.vector.app.ui.UiAllScreensSanityTest || (adb pull storage/emulated/0/Pictures/failure_screenshots && exit 1 )
258258
- name: Upload Test Report Log
259-
uses: actions/upload-artifact@v2
259+
uses: actions/upload-artifact@v3
260260
if: always()
261261
with:
262262
name: uitest-error-results
@@ -265,14 +265,15 @@ jobs:
265265
failure_screenshots/
266266
267267
codecov-units:
268+
name: Unit tests with code coverage
268269
runs-on: macos-latest
269270
steps:
270271
- uses: actions/checkout@v3
271-
- uses: actions/setup-java@v2
272+
- uses: actions/setup-java@v3
272273
with:
273274
distribution: 'adopt'
274275
java-version: '11'
275-
- uses: actions/cache@v2
276+
- uses: actions/cache@v3
276277
with:
277278
path: |
278279
~/.gradle/caches
@@ -282,25 +283,26 @@ jobs:
282283
${{ runner.os }}-gradle-
283284
- run: ./gradlew allCodeCoverageReport $CI_GRADLE_ARG_PROPERTIES
284285
- name: Upload Codecov data
285-
uses: actions/upload-artifact@v2
286+
uses: actions/upload-artifact@v3
286287
if: always()
287288
with:
288289
name: codecov-xml
289290
path: |
290291
build/reports/jacoco/allCodeCoverageReport/allCodeCoverageReport.xml
291292
292293
sonarqube:
294+
name: Sonarqube upload
293295
runs-on: macos-latest
294-
if: always()
296+
if: always() && github.event_name == 'schedule'
295297
needs:
296298
- codecov-units
297299
steps:
298300
- uses: actions/checkout@v3
299-
- uses: actions/setup-java@v2
301+
- uses: actions/setup-java@v3
300302
with:
301303
distribution: 'adopt'
302304
java-version: '11'
303-
- uses: actions/cache@v2
305+
- uses: actions/cache@v3
304306
with:
305307
path: |
306308
~/.gradle/caches
@@ -317,8 +319,9 @@ jobs:
317319
env:
318320
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
319321

320-
# Notify the channel about scheduled runs, do not notify for manually triggered runs
322+
# Notify the channel about scheduled runs, or pushes to the release branches, do not notify for manually triggered runs
321323
notify:
324+
name: Notify matrix
322325
runs-on: ubuntu-latest
323326
needs:
324327
- integration-tests
@@ -327,10 +330,9 @@ jobs:
327330
if: always() && github.event_name != 'workflow_dispatch'
328331
# No concurrency required, runs every time on a schedule.
329332
steps:
330-
- uses: michaelkaye/matrix-hookshot-action@v0.3.0
333+
- uses: michaelkaye/matrix-hookshot-action@v1.0.0
331334
with:
332335
github_token: ${{ secrets.GITHUB_TOKEN }}
333-
matrix_access_token: ${{ secrets.ELEMENT_ANDROID_NOTIFICATION_ACCESS_TOKEN }}
334-
matrix_room_id: ${{ secrets.ELEMENT_ANDROID_INTERNAL_ROOM_ID }}
335-
text_template: "Nightly test run: {{#each job_statuses }}{{#with this }}{{#if completed }} {{name}} {{conclusion}} at {{completed_at}}, {{/if}}{{/with}}{{/each}}"
336-
html_template: "Nightly test run results: {{#each job_statuses }}{{#with this }}{{#if completed }}<br />{{name}} {{conclusion}} at {{completed_at}} <a href=\"{{html_url}}\">[details]</a>{{/if}}{{/with}}{{/each}}"
336+
hookshot_url: ${{ secrets.ELEMENT_ANDROID_HOOKSHOT_URL }}
337+
text_template: "{{#if '${{ github.event_name }}' == 'schedule' }}Nightly test run{{else}}Test run (on ${{ github.ref }}){{/if }}: {{#each job_statuses }}{{#with this }}{{#if completed }} {{name}} {{conclusion}} at {{completed_at}}, {{/if}}{{/with}}{{/each}}"
338+
html_template: "{{#if '${{ github.event_name }}' == 'schedule' }}Nightly test run{{else}}Test run (on ${{ github.ref }}){{/if }}: {{#each job_statuses }}{{#with this }}{{#if completed }}<br />{{icon conclusion}} {{name}} <font color='{{color conclusion}}'>{{conclusion}} at {{completed_at}} <a href=\"{{html_url}}\">[details]</a></font>{{/if}}{{/with}}{{/each}}"

.github/workflows/quality.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
./gradlew ktlintCheck --continue
3030
- name: Upload reports
3131
if: always()
32-
uses: actions/upload-artifact@v2
32+
uses: actions/upload-artifact@v3
3333
with:
3434
name: ktlinting-report
3535
path: |
@@ -59,15 +59,15 @@ jobs:
5959
fi
6060
- name: Find Comment
6161
if: always() && github.event_name == 'pull_request'
62-
uses: peter-evans/find-comment@v1
62+
uses: peter-evans/find-comment@v2
6363
id: fc
6464
with:
6565
issue-number: ${{ github.event.pull_request.number }}
6666
comment-author: 'github-actions[bot]'
6767
body-includes: Ktlint Results
6868
- name: Add comment if needed
6969
if: always() && github.event_name == 'pull_request' && steps.ktlint-results.outputs.add_comment == 'true'
70-
uses: peter-evans/create-or-update-comment@v1
70+
uses: peter-evans/create-or-update-comment@v2
7171
with:
7272
comment-id: ${{ steps.fc.outputs.comment-id }}
7373
issue-number: ${{ github.event.pull_request.number }}
@@ -97,7 +97,7 @@ jobs:
9797
cancel-in-progress: true
9898
steps:
9999
- uses: actions/checkout@v3
100-
- uses: actions/cache@v2
100+
- uses: actions/cache@v3
101101
with:
102102
path: |
103103
~/.gradle/caches
@@ -109,7 +109,7 @@ jobs:
109109
run: ./gradlew clean :vector:lint --stacktrace
110110
- name: Upload reports
111111
if: always()
112-
uses: actions/upload-artifact@v2
112+
uses: actions/upload-artifact@v3
113113
with:
114114
name: lint-report
115115
path: |
@@ -130,7 +130,7 @@ jobs:
130130
cancel-in-progress: true
131131
steps:
132132
- uses: actions/checkout@v3
133-
- uses: actions/cache@v2
133+
- uses: actions/cache@v3
134134
with:
135135
path: |
136136
~/.gradle/caches
@@ -142,7 +142,7 @@ jobs:
142142
run: ./gradlew clean lint${{ matrix.target }}Release --stacktrace
143143
- name: Upload ${{ matrix.target }} linting report
144144
if: always()
145-
uses: actions/upload-artifact@v2
145+
uses: actions/upload-artifact@v3
146146
with:
147147
name: release-lint-report-${{ matrix.target }}
148148
path: |

.github/workflows/sync-from-external-sources.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Run Emoji script
2424
run: ./tools/import_emojis.py
2525
- name: Create Pull Request for Emojis
26-
uses: peter-evans/create-pull-request@v3
26+
uses: peter-evans/create-pull-request@v4
2727
with:
2828
commit-message: Sync Emojis
2929
title: Sync Emojis
@@ -49,7 +49,7 @@ jobs:
4949
- name: Run SAS String script
5050
run: ./tools/import_sas_strings.py
5151
- name: Create Pull Request for SAS Strings
52-
uses: peter-evans/create-pull-request@v3
52+
uses: peter-evans/create-pull-request@v4
5353
with:
5454
commit-message: Sync SAS Strings
5555
title: Sync SAS Strings
@@ -68,7 +68,7 @@ jobs:
6868
- name: Run analytics import script
6969
run: ./tools/import_analytic_plan.sh
7070
- name: Create Pull Request for analytics plan
71-
uses: peter-evans/create-pull-request@v3
71+
uses: peter-evans/create-pull-request@v4
7272
with:
7373
commit-message: Sync analytics plan
7474
title: Sync analytics plan

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
cancel-in-progress: true
2222
steps:
2323
- uses: actions/checkout@v3
24-
- uses: actions/setup-java@v2
24+
- uses: actions/setup-java@v3
2525
with:
2626
distribution: 'adopt'
2727
java-version: 11
28-
- uses: actions/cache@v2
28+
- uses: actions/cache@v3
2929
with:
3030
path: |
3131
~/.gradle/caches
@@ -45,7 +45,7 @@ jobs:
4545
cancel-in-progress: true
4646
steps:
4747
- uses: actions/checkout@v3
48-
- uses: actions/cache@v2
48+
- uses: actions/cache@v3
4949
with:
5050
path: |
5151
~/.gradle/caches

.github/workflows/triage-labelled.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
if: >
1212
contains(github.event.issue.labels.*.name, 'A-Maths') ||
1313
contains(github.event.issue.labels.*.name, 'A-Message-Pinning') ||
14-
contains(github.event.issue.labels.*.name, 'A-Threads') ||
1514
contains(github.event.issue.labels.*.name, 'A-Polls') ||
1615
contains(github.event.issue.labels.*.name, 'A-Location-Sharing') ||
1716
contains(github.event.issue.labels.*.name, 'A-Message-Bubbles') ||
@@ -252,3 +251,30 @@ jobs:
252251
env:
253252
PROJECT_ID: "PN_kwDOAM0swc4AArk0"
254253
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
254+
255+
move_element_x_issues:
256+
name: ElementX issues to ElementX project board
257+
runs-on: ubuntu-latest
258+
# Skip in forks
259+
if: >
260+
github.repository == 'vector-im/element-android' &&
261+
(contains(github.event.issue.labels.*.name, 'Z-ElementX-Alpha') ||
262+
contains(github.event.issue.labels.*.name, 'Z-ElementX-Beta') ||
263+
contains(github.event.issue.labels.*.name, 'Z-ElementX'))
264+
steps:
265+
- uses: octokit/[email protected]
266+
with:
267+
headers: '{"GraphQL-Features": "projects_next_graphql"}'
268+
query: |
269+
mutation add_to_project($projectid:ID!,$contentid:ID!) {
270+
addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
271+
projectNextItem {
272+
id
273+
}
274+
}
275+
}
276+
projectid: ${{ env.PROJECT_ID }}
277+
contentid: ${{ github.event.issue.node_id }}
278+
env:
279+
PROJECT_ID: "PN_kwDOAM0swc4ABTXY"
280+
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}

.github/workflows/triage-move-review-requests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
add_design_pr_to_project:
88
name: Move PRs asking for design review to the design board
99
runs-on: ubuntu-latest
10+
# Skip in forks
11+
if: github.repository == 'vector-im/element-android'
1012
steps:
1113
- uses: octokit/[email protected]
1214
id: find_team_members
@@ -74,6 +76,8 @@ jobs:
7476
add_product_pr_to_project:
7577
name: Move PRs asking for product review to the product board
7678
runs-on: ubuntu-latest
79+
# Skip in forks
80+
if: github.repository == 'vector-im/element-android'
7781
steps:
7882
- uses: octokit/[email protected]
7983
id: find_team_members

0 commit comments

Comments
 (0)