Skip to content

Commit c7627ef

Browse files
committed
Merge branch 'release/0.1.2' into main
2 parents cf3f1e8 + 9b1d113 commit c7627ef

File tree

974 files changed

+10611
-4183
lines changed

Some content is hidden

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

974 files changed

+10611
-4183
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
**/snapshots/**/*.png filter=lfs diff=lfs merge=lfs -text
2+
**/docs/images-lfs/*.png filter=lfs diff=lfs merge=lfs -text

.github/workflows/build.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ name: APK Build
22

33
on:
44
workflow_dispatch:
5-
pull_request: { }
5+
pull_request:
6+
merge_group:
67
push:
7-
branches: [ main, develop ]
8+
branches: [ develop ]
89

910
# Enrich gradle.properties for CI/CD
1011
env:
@@ -13,14 +14,17 @@ env:
1314

1415
jobs:
1516
debug:
16-
name: Build debug APKs
17+
name: Build APKs
1718
runs-on: ubuntu-latest
18-
if: github.ref != 'refs/heads/main'
19+
# Skip for `main` and the merge queue if the branch is up to date with `develop`
20+
if: github.ref != 'refs/heads/main' && github.event.merge_group.base_ref != 'refs/heads/develop'
1921
strategy:
22+
matrix:
23+
variant: [debug, release, nightly, samples]
2024
fail-fast: false
2125
# Allow all jobs on develop. Just one per PR.
2226
concurrency:
23-
group: ${{ github.ref == 'refs/heads/develop' && format('build-develop-{0}', github.sha) || format('build-debug-{0}', github.ref) }}
27+
group: ${{ github.ref == 'refs/heads/develop' && format('build-develop-{0}-{1}', matrix.variant, github.sha) || format('build-{0}-{1}', matrix.variant, github.ref) }}
2428
cancel-in-progress: true
2529
steps:
2630
- uses: actions/checkout@v3
@@ -34,14 +38,18 @@ jobs:
3438
distribution: 'temurin' # See 'Supported distributions' for available options
3539
java-version: '17'
3640
- name: Configure gradle
37-
uses: gradle/gradle-build-action@v2.6.1
41+
uses: gradle/gradle-build-action@v2.7.0
3842
with:
3943
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
4044
- name: Assemble debug APK
45+
if: ${{ matrix.variant == 'debug' }}
4146
env:
4247
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
43-
run: ./gradlew assembleDebug $CI_GRADLE_ARG_PROPERTIES
44-
- name: Upload debug APKs
48+
ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }}
49+
ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }}
50+
run: ./gradlew assembleDebug -PallWarningsAsErrors=true $CI_GRADLE_ARG_PROPERTIES
51+
- name: Upload APK APKs
52+
if: ${{ matrix.variant == 'debug' }}
4553
uses: actions/upload-artifact@v3
4654
with:
4755
name: elementx-debug
@@ -53,12 +61,12 @@ jobs:
5361
continue-on-error: true
5462
env:
5563
token: ${{ secrets.DIAWI_TOKEN }}
56-
if: ${{ github.event_name == 'pull_request' && env.token != '' }}
64+
if: ${{ matrix.variant == 'debug' && github.event_name == 'pull_request' && env.token != '' }}
5765
with:
5866
token: ${{ env.token }}
5967
file: app/build/outputs/apk/debug/app-arm64-v8a-debug.apk
6068
- name: Add or update PR comment with QR Code to download APK.
61-
if: ${{ github.event_name == 'pull_request' && steps.diawi.conclusion == 'success' }}
69+
if: ${{ matrix.variant == 'debug' && github.event_name == 'pull_request' && steps.diawi.conclusion == 'success' }}
6270
uses: NejcZdovc/comment-pr@v2
6371
with:
6472
message: |
@@ -70,8 +78,11 @@ jobs:
7078
env:
7179
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7280
- name: Compile release sources
73-
run: ./gradlew compileReleaseSources $CI_GRADLE_ARG_PROPERTIES
81+
if: ${{ matrix.variant == 'release' }}
82+
run: ./gradlew compileReleaseSources -PallWarningsAsErrors=true $CI_GRADLE_ARG_PROPERTIES
7483
- name: Compile nightly sources
75-
run: ./gradlew compileNightlySources $CI_GRADLE_ARG_PROPERTIES
84+
if: ${{ matrix.variant == 'nightly' }}
85+
run: ./gradlew compileNightlySources -PallWarningsAsErrors=true $CI_GRADLE_ARG_PROPERTIES
7686
- name: Compile samples minimal
87+
if: ${{ matrix.variant == 'samples' }}
7788
run: ./gradlew :samples:minimal:assemble $CI_GRADLE_ARG_PROPERTIES

.github/workflows/danger.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
name: Danger CI
22

3-
on: [pull_request]
3+
on: [pull_request, merge_group]
44

55
jobs:
66
build:
77
runs-on: ubuntu-latest
8+
# Don't run in the merge queue again if the branch is up to date with `develop`
9+
if: github.event.merge_group.base_ref != 'refs/heads/develop'
810
name: Danger main check
911
steps:
1012
- uses: actions/checkout@v3
1113
- run: |
1214
npm install --save-dev @babel/plugin-transform-flow-strip-types
1315
- name: Danger
14-
uses: danger/[email protected].6
16+
uses: danger/[email protected].8
1517
with:
1618
args: "--dangerfile ./tools/danger/dangerfile.js"
1719
env:

.github/workflows/gradle-wrapper-validation.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
name: "Validate Gradle Wrapper"
22
on:
3-
pull_request: { }
3+
pull_request:
4+
merge_group:
45
push:
56
branches: [ main, develop ]
67

78
jobs:
89
validation:
910
name: "Validation"
11+
# Don't run in the merge queue again if the branch is up to date with `develop`
12+
if: github.event.merge_group.base_ref != 'refs/heads/develop'
1013
runs-on: ubuntu-latest
1114
# No concurrency required, this is a prerequisite to other actions and should run every time.
1215
steps:

.github/workflows/maestro.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,14 @@ jobs:
3838
run: ./gradlew assembleDebug $CI_GRADLE_ARG_PROPERTIES
3939
env:
4040
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
41-
- name: Upload debug APKs
42-
uses: actions/upload-artifact@v3
43-
with:
44-
name: elementx-debug
45-
path: |
46-
app/build/outputs/apk/debug/*.apk
41+
ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }}
42+
ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }}
4743
- uses: mobile-dev-inc/[email protected]
4844
with:
4945
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
50-
app-file: app/build/outputs/apk/debug/app-universal-debug.apk
46+
# Doc says (https://github.com/mobile-dev-inc/action-maestro-cloud#android):
47+
# app-file should point to an x86 compatible APK file, so upload the x86_64 one (much smaller than the universal APK).
48+
app-file: app/build/outputs/apk/debug/app-x86_64-debug.apk
5149
env: |
5250
USERNAME=maestroelement
5351
PASSWORD=${{ secrets.MATRIX_MAESTRO_ACCOUNT_PASSWORD }}

.github/workflows/nightly.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and release nightly APK
1+
name: Build and release nightly application
22

33
on:
44
workflow_dispatch:
@@ -12,7 +12,7 @@ env:
1212

1313
jobs:
1414
nightly:
15-
name: Build and publish nightly APK to Firebase
15+
name: Build and publish nightly bundle to Firebase
1616
runs-on: ubuntu-latest
1717
if: ${{ github.repository == 'vector-im/element-x-android' }}
1818
steps:
@@ -31,18 +31,21 @@ jobs:
3131
sed 's/CHANGES\.md/CHANGES_NIGHTLY\.md/' towncrier.toml.bak > towncrier.toml
3232
rm towncrier.toml.bak
3333
yes n | towncrier build --version nightly
34-
- name: Build and upload Nightly APK
34+
- name: Build and upload Nightly application
3535
run: |
3636
./gradlew assembleNightly appDistributionUploadNightly $CI_GRADLE_ARG_PROPERTIES
3737
env:
3838
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
39+
ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }}
40+
ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }}
3941
ELEMENT_ANDROID_NIGHTLY_KEYID: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYID }}
4042
ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD }}
4143
ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD }}
4244
FIREBASE_TOKEN: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_FIREBASE_TOKEN }}
4345
- name: Additionally upload Nightly APK to browserstack for testing
4446
continue-on-error: true # don't block anything by this upload failing (for now)
45-
run: curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_PASSWORD" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@app/build/outputs/apk/nightly/app-universal-nightly.apk" -F "custom_id=element-x-android-nightly"
47+
run: |
48+
curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_PASSWORD" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@app/build/outputs/apk/nightly/app-universal-nightly.apk" -F "custom_id=element-x-android-nightly"
4649
env:
4750
BROWSERSTACK_USERNAME: ${{ secrets.ELEMENT_ANDROID_BROWSERSTACK_USERNAME }}
4851
BROWSERSTACK_PASSWORD: ${{ secrets.ELEMENT_ANDROID_BROWSERSTACK_ACCESS_KEY }}

.github/workflows/nightlyReports.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
distribution: 'temurin' # See 'Supported distributions' for available options
6363
java-version: '17'
6464
- name: Configure gradle
65-
uses: gradle/gradle-build-action@v2.6.1
65+
uses: gradle/gradle-build-action@v2.7.0
6666
with:
6767
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
6868
- name: Dependency analysis

.github/workflows/quality.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Code Quality Checks
22

33
on:
44
workflow_dispatch:
5-
pull_request: { }
5+
pull_request:
6+
merge_group:
67
push:
78
branches: [ main, develop ]
89

@@ -15,6 +16,8 @@ jobs:
1516
checkScript:
1617
name: Search for forbidden patterns
1718
runs-on: ubuntu-latest
19+
# Don't run in the merge queue again if the branch is up to date with `develop`
20+
if: github.event.merge_group.base_ref != 'refs/heads/develop'
1821
steps:
1922
- uses: actions/checkout@v3
2023
- name: Run code quality check suite
@@ -23,6 +26,8 @@ jobs:
2326
check:
2427
name: Project Check Suite
2528
runs-on: ubuntu-latest
29+
# Don't run in the merge queue again if the branch is up to date with `develop`
30+
if: github.event.merge_group.base_ref != 'refs/heads/develop'
2631
# Allow all jobs on main and develop. Just one per PR.
2732
concurrency:
2833
group: ${{ github.ref == 'refs/heads/main' && format('check-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-develop-{0}', github.sha) || format('check-{0}', github.ref) }}
@@ -39,7 +44,7 @@ jobs:
3944
distribution: 'temurin' # See 'Supported distributions' for available options
4045
java-version: '17'
4146
- name: Configure gradle
42-
uses: gradle/gradle-build-action@v2.6.1
47+
uses: gradle/gradle-build-action@v2.7.0
4348
with:
4449
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
4550
- name: Run code quality check suite
@@ -65,7 +70,7 @@ jobs:
6570
yarn add danger-plugin-lint-report --dev
6671
- name: Danger lint
6772
if: always()
68-
uses: danger/[email protected].6
73+
uses: danger/[email protected].8
6974
with:
7075
args: "--dangerfile ./tools/danger/dangerfile-lint.js"
7176
env:

.github/workflows/recordScreenshots.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
java-version: '17'
2525
# Add gradle cache, this should speed up the process
2626
- name: Configure gradle
27-
uses: gradle/gradle-build-action@v2.6.1
27+
uses: gradle/gradle-build-action@v2.7.0
2828
with:
2929
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
3030
- name: Record screenshots

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Create release App Bundle
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ]
7+
8+
# Enrich gradle.properties for CI/CD
9+
env:
10+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
11+
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon
12+
13+
jobs:
14+
release:
15+
name: Create App Bundle
16+
runs-on: ubuntu-latest
17+
concurrency:
18+
group: ${{ github.ref == 'refs/head/main' && format('build-release-main-{0}', github.sha) }}
19+
cancel-in-progress: true
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Use JDK 17
23+
uses: actions/setup-java@v3
24+
with:
25+
distribution: 'temurin' # See 'Supported distributions' for available options
26+
java-version: '17'
27+
- name: Configure gradle
28+
uses: gradle/[email protected]
29+
- name: Create app bundle
30+
env:
31+
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
32+
ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }}
33+
ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }}
34+
run: ./gradlew bundleRelease $CI_GRADLE_ARG_PROPERTIES
35+
- name: Upload bundle as artifact
36+
uses: actions/upload-artifact@v3
37+
with:
38+
name: elementx-app-bundle-unsigned
39+
path: |
40+
app/build/outputs/bundle/release/app-release.aab

0 commit comments

Comments
 (0)