Skip to content

Commit 9af0b91

Browse files
authored
Merge pull request #123 from devinbileck/support-latest-api-level
Support API level 36
2 parents b15f7ef + 5a3da8b commit 9af0b91

Some content is hidden

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

59 files changed

+1052
-7091
lines changed

.github/actions/get-avd-info/action.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,22 @@ runs:
1616
steps:
1717
# Prefer ATD system images available in API 30+ as they are optimized for headless tests.
1818
# Google Play services is required and is available in the google_atd and google_apis images.
19-
# Note, API 27 does not provide a google_apis system image.
19+
# Note:
20+
# - API 27 does not provide a google_apis system image.
21+
# - Newer API's may not yet provide an ATD system image.
2022
- id: get-avd-target
21-
run: echo "target=$(if [ ${{ inputs.api-level }} -eq 27 ]; then echo default; elif [ ${{ inputs.api-level }} -ge 30 ]; then echo google_atd; else echo google_apis; fi)" >> $GITHUB_OUTPUT
2223
shell: bash
24+
run: |
25+
set -euo pipefail
26+
api="${{ inputs.api-level }}"
27+
target="google_apis"
28+
if [[ "$api" -eq 27 ]]; then
29+
target="default"
30+
elif [[ "$api" -ge 30 ]] && sdkmanager --list | grep -q "system-images;android-$api;google_atd;"; then
31+
target="google_atd"
32+
fi
33+
echo "target=$target" >> "$GITHUB_OUTPUT"
2334
# Prefer x86_64 architecture
2435
- id: get-avd-arch
25-
run: echo "arch=x86_64" >> $GITHUB_OUTPUT
2636
shell: bash
37+
run: echo "arch=x86_64" >> $GITHUB_OUTPUT

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "monthly"
7+
- package-ecosystem: "gradle"
8+
directory: "/"
9+
schedule:
10+
interval: "monthly"

.github/workflows/ci.yaml

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
jobs:
1111
analyze:
1212
name: Analyze
13-
if: ${{ github.actor != 'dependabot[bot]' }}
1413
runs-on: ubuntu-latest
1514
timeout-minutes: 10
1615
steps:
@@ -36,9 +35,6 @@ jobs:
3635
~/.gradle/wrapper
3736
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }}
3837

39-
- name: Check Gradle wrapper
40-
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6
41-
4238
- name: Check code style
4339
run: ./gradlew ktlintCheck
4440

@@ -95,9 +91,6 @@ jobs:
9591
~/.gradle/wrapper
9692
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }}
9793

98-
- name: Check Gradle wrapper
99-
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6
100-
10194
# TODO: Add code coverage metrics
10295
# See https://about.codecov.io/blog/code-coverage-for-android-development-using-kotlin-jacoco-github-actions-and-codecov/
10396
- name: Run unit tests
@@ -113,12 +106,12 @@ jobs:
113106
instrumentation-tests:
114107
name: Instrumentation tests on API ${{ matrix.api-level }}
115108
runs-on: ubuntu-latest
116-
timeout-minutes: 15
109+
timeout-minutes: 30
117110
needs: unit-tests
118111
strategy:
119112
fail-fast: false
120113
matrix:
121-
api-level: [ 26, 27, 28, 29, 30, 31, 32, 33, 34 ]
114+
api-level: [ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 ]
122115
steps:
123116
- name: Checkout the code
124117
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -142,9 +135,6 @@ jobs:
142135
~/.gradle/wrapper
143136
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }}
144137

145-
- name: Check Gradle wrapper
146-
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6
147-
148138
- name: Enable KVM
149139
run: |
150140
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
@@ -160,30 +150,6 @@ jobs:
160150
with:
161151
api-level: ${{ matrix.api-level }}
162152

163-
# Retrieve the cached emulator snapshot
164-
- name: Retrieve cached emulator snapshot
165-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
166-
id: avd-cache
167-
with:
168-
path: |
169-
~/.android/avd/*
170-
~/.android/adb*
171-
key: ${{ runner.os }}-avd-${{ env.CACHE_VERSION }}-${{ steps.avd-info.outputs.arch }}-${{ steps.avd-info.outputs.target }}-${{ matrix.api-level }}
172-
173-
# Create a new emulator snapshot if it isn't present in the cache
174-
- name: Create AVD snapshot
175-
if: steps.avd-cache.outputs.cache-hit != 'true'
176-
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed
177-
with:
178-
api-level: ${{ matrix.api-level }}
179-
target: ${{ steps.avd-info.outputs.target }}
180-
arch: ${{ steps.avd-info.outputs.arch }}
181-
disable-animations: true
182-
force-avd-creation: false
183-
ram-size: 4096M
184-
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
185-
script: echo "Generated AVD snapshot"
186-
187153
- name: Run instrumentation tests
188154
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed
189155
with:
@@ -193,8 +159,19 @@ jobs:
193159
disable-animations: true
194160
force-avd-creation: false
195161
ram-size: 4096M
196-
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
197-
script: ./gradlew connectedCheck && killall -INT crashpad_handler || true
162+
emulator-options: >-
163+
-no-snapshot -wipe-data
164+
-no-window -gpu swiftshader_indirect -noaudio
165+
-no-boot-anim -camera-back none -camera-front none
166+
script: |
167+
adb shell settings put global window_animation_scale 0
168+
adb shell settings put global transition_animation_scale 0
169+
adb shell settings put global animator_duration_scale 0
170+
adb shell cmd package bg-dexopt-job || true
171+
./gradlew connectedCheck
172+
RC=$?
173+
killall -INT crashpad_handler || true
174+
exit $RC
198175
199176
- name: Upload reports
200177
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08

.github/workflows/master.yaml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
jobs:
1111
build:
1212
name: Build
13-
if: ${{ github.actor != 'dependabot[bot]' }}
1413
runs-on: ubuntu-latest
1514
timeout-minutes: 10
1615
outputs:
@@ -53,9 +52,6 @@ jobs:
5352
~/.gradle/wrapper
5453
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }}
5554

56-
- name: Check Gradle wrapper
57-
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6
58-
5955
- name: Build the app
6056
run: ./gradlew assembleRelease bundleRelease
6157

@@ -69,15 +65,15 @@ jobs:
6965
- name: Upload unsigned APK
7066
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
7167
with:
72-
name: bisq-release.apk
73-
path: app/build/outputs/apk/release/bisq-release.apk
68+
name: bisq-notifications-release.apk
69+
path: app/build/outputs/apk/release/bisq-notifications-release.apk
7470
if-no-files-found: error
7571

7672
- name: Upload unsigned AAB
7773
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
7874
with:
79-
name: bisq-release.aab
80-
path: app/build/outputs/bundle/release/bisq-release.aab
75+
name: bisq-notifications-release.aab
76+
path: app/build/outputs/bundle/release/bisq-notifications-release.aab
8177
if-no-files-found: error
8278

8379
sign:
@@ -89,13 +85,13 @@ jobs:
8985
- name: Download unsigned APK
9086
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
9187
with:
92-
name: bisq-release.apk
88+
name: bisq-notifications-release.apk
9389
path: app/build/outputs/apk/release
9490

9591
- name: Download unsigned AAB
9692
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
9793
with:
98-
name: bisq-release.aab
94+
name: bisq-notifications-release.aab
9995
path: app/build/outputs/bundle/release
10096

10197
- name: Determine latest build-tools version
@@ -132,17 +128,19 @@ jobs:
132128
- name: Upload signed APK
133129
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
134130
with:
135-
name: bisq-release-signed.apk
131+
name: bisq-notifications-release-signed.apk
136132
path: ${{ steps.sign_apk.outputs.signedReleaseFile }}
137133

138134
- name: Upload signed AAB
139135
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
140136
with:
141-
name: bisq-release-signed.aab
137+
name: bisq-notifications-release-signed.aab
142138
path: ${{ steps.sign_aab.outputs.signedReleaseFile }}
143139

144140
upload_to_firebase:
145141
name: Upload to Firebase
142+
# Is this job necessary? Temporarily disable it for now
143+
if: false
146144
runs-on: ubuntu-latest
147145
timeout-minutes: 10
148146
needs: [ build, sign ]
@@ -153,25 +151,25 @@ jobs:
153151
- name: Download signed APK
154152
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
155153
with:
156-
name: bisq-release-signed.apk
154+
name: bisq-notifications-release-signed.apk
157155
path: app/build/outputs/apk/release
158156

159157
- name: Download signed AAB
160158
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
161159
with:
162-
name: bisq-release-signed.aab
160+
name: bisq-notifications-release-signed.aab
163161
path: app/build/outputs/bundle/release
164162

165163
- name: Upload signed APK to Firebase App Distribution
166164
uses: wzieba/Firebase-Distribution-Github-Action@bd494989dd4bec0343f78adee87fe66e48279ad6
167165
with:
168166
appId: ${{ secrets.FIREBASE_APP_ID }}
169167
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
170-
file: app/build/outputs/apk/release/bisq-release-signed.apk
168+
file: app/build/outputs/apk/release/bisq-notifications-release-signed.apk
171169

172170
- name: Upload signed AAB to Firebase App Distribution
173171
uses: wzieba/Firebase-Distribution-Github-Action@bd494989dd4bec0343f78adee87fe66e48279ad6
174172
with:
175173
appId: ${{ secrets.FIREBASE_APP_ID }}
176174
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
177-
file: app/build/outputs/bundle/release/bisq-release.aab
175+
file: app/build/outputs/bundle/release/bisq-notifications-release.aab

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ jobs:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
with:
4141
upload_url: ${{ steps.create_release.outputs.upload_url }}
42-
asset_path: ./bisq-release-signed.apk
43-
asset_name: bisq-release-signed.apk
42+
asset_path: ./bisq-notifications-release-signed.apk
43+
asset_name: bisq-notifications-release-signed.apk
4444
asset_content_type: application/zip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.gradle/
22
.idea/
3+
*.iml
34
app/build/
45
app/release/
56
app/google-services.json

README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,6 @@ for more information.
1414
> Note, the `google-services.json` file needs to correspond to the `fcmServiceAccountKey.json`
1515
> used by the [bisq-relay](https://github.com/bisq-network/bisq-relay) service.
1616
17-
## Updating Dependencies
18-
19-
Whenever dependencies are updated/changed, it is necessary to update the following:
20-
21-
- [gradle/verification-metadata.xml](gradle/verification-metadata.xml) - can be updated using the
22-
following command:
23-
24-
```shell
25-
./gradlew --write-verification-metadata sha256 build :app:processDebugResources :app:connectedDebugAndroidTest
26-
```
27-
28-
- [gradle.lockfile](gradle.lockfile) - can be updated using the following command:
29-
30-
```shell
31-
./gradlew dependencies --write-locks
32-
```
33-
3417
## Architectural Design
3518

3619
For information on the architectural design, refer to the

0 commit comments

Comments
 (0)