Skip to content

Commit

Permalink
Merge pull request #61 from devinbileck/major-update
Browse files Browse the repository at this point in the history
Major update
  • Loading branch information
devinbileck authored Jan 11, 2025
2 parents 8d66564 + 3bb879d commit 611d16d
Show file tree
Hide file tree
Showing 128 changed files with 10,107 additions and 6,799 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ insert_final_newline = true
[.idea/codeStyles/*.xml]
indent_size = 2
insert_final_newline = false

[*.{kt,kts}]
max_line_length = 120
ktlint_code_style = android_studio
ktlint_standard_import-ordering = disabled
ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset
ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_standard_function-signature = disabled
18 changes: 11 additions & 7 deletions .github/actions/get-avd-info/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ inputs:
description: The API level for which to retrieve AVD info
required: true
outputs:
arch:
description: CPU architecture of the system image
value: ${{ steps.get-avd-arch.outputs.arch }}
target:
description: Target of the system image
value: ${{ steps.get-avd-target.outputs.target }}
arch:
description: CPU architecture of the system image
value: ${{ steps.get-avd-arch.outputs.arch }}
runs:
using: "composite"
steps:
- id: get-avd-arch
run: echo "::set-output name=arch::$(if [ ${{ inputs.api-level }} -ge 30 ]; then echo x86_64; else echo x86; fi)"
shell: bash
# Prefer ATD system images available in API 30+ as they are optimized for headless tests.
# Google Play services is required and is available in the google_atd and google_apis images.
# Note, API 27 does not provide a google_apis system image.
- id: get-avd-target
run: echo "::set-output name=target::$(if [ ${{ inputs.api-level }} -ge 32 ]; then echo google_apis; else echo default; fi)"
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
shell: bash
# Prefer x86_64 architecture
- id: get-avd-arch
run: echo "arch=x86_64" >> $GITHUB_OUTPUT
shell: bash
56 changes: 32 additions & 24 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
- name: Checkout the code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
with:
java-version: '11'
distribution: 'temurin'
java-version: '17'
distribution: 'corretto'
cache: gradle

- name: Clear gradle cache
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Upload reports
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: Test-Reports
name: analyze-reports
path: app/build/reports
if: always()

Expand All @@ -76,11 +76,11 @@ jobs:
- name: Checkout the code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
with:
java-version: '11'
distribution: 'temurin'
java-version: '17'
distribution: 'corretto'
cache: gradle

- name: Clear gradle cache
Expand All @@ -106,28 +106,28 @@ jobs:
- name: Upload reports
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: Test-Reports
name: unit-tests-reports
path: app/build/reports
if: always()

instrumentation-tests:
name: Instrumentation tests on ${{ matrix.target }} API ${{ matrix.api-level }}
runs-on: macos-latest
timeout-minutes: 30
name: Instrumentation tests on API ${{ matrix.api-level }}
runs-on: ubuntu-latest
timeout-minutes: 15
needs: unit-tests
strategy:
fail-fast: true
fail-fast: false
matrix:
api-level: [ 21, 32 ]
api-level: [ 26, 27, 28, 29, 30, 31, 32, 33, 34 ]
steps:
- name: Checkout the code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
with:
java-version: '11'
distribution: 'temurin'
java-version: '17'
distribution: 'corretto'
cache: gradle

- name: Clear gradle cache
Expand All @@ -145,7 +145,15 @@ jobs:
- name: Check Gradle wrapper
uses: gradle/wrapper-validation-action@216d1ad2b3710bf005dc39237337b9673fd8fcd5

# API 30+ emulators only have x86_64 system images
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Create directory for AVD
run: mkdir -p ~/.android/avd

- name: Get AVD info
uses: ./.github/actions/get-avd-info
id: avd-info
Expand All @@ -168,29 +176,29 @@ jobs:
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ steps.avd-info.outputs.arch }}
target: ${{ steps.avd-info.outputs.target }}
disable-animations: false
arch: ${{ steps.avd-info.outputs.arch }}
disable-animations: true
force-avd-creation: false
ram-size: 4096M
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: echo "Generated AVD snapshot"

- name: Run instrumentation tests
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d
with:
api-level: ${{ matrix.api-level }}
arch: ${{ steps.avd-info.outputs.arch }}
target: ${{ steps.avd-info.outputs.target }}
arch: ${{ steps.avd-info.outputs.arch }}
disable-animations: true
force-avd-creation: false
ram-size: 4096M
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save
script: mv .github/debug.keystore ~/.android; ./gradlew connectedDebugAndroidTest
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: ./gradlew connectedCheck && killall -INT crashpad_handler || true

- name: Upload reports
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: Test-Reports
name: instrumentation-tests-reports-api${{ matrix.api-level }}
path: app/build/reports
if: always()
17 changes: 14 additions & 3 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo $GOOGLE_SERVICES_JSON > app/google-services.json

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
with:
java-version: '11'
distribution: 'temurin'
java-version: '17'
distribution: 'corretto'
cache: gradle

- name: Clear gradle cache
Expand Down Expand Up @@ -98,6 +98,13 @@ jobs:
name: bisq-release.aab
path: app/build/outputs/bundle/release

- name: Determine latest build-tools version
shell: bash
run: |
LATEST_BUILD_TOOLS_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "LATEST_BUILD_TOOLS_VERSION=$LATEST_BUILD_TOOLS_VERSION" >> $GITHUB_ENV
echo Latest build tools version is: $LATEST_BUILD_TOOLS_VERSION
- name: Sign APK
uses: r0adkll/sign-android-release@dbeba6b98a60b0fd540c02443c7f428cdedf0e7f
id: sign_apk
Expand All @@ -107,6 +114,8 @@ jobs:
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: ${{ env.LATEST_BUILD_TOOLS_VERSION }}

- name: Sign AAB
uses: r0adkll/sign-android-release@dbeba6b98a60b0fd540c02443c7f428cdedf0e7f
Expand All @@ -117,6 +126,8 @@ jobs:
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: ${{ env.LATEST_BUILD_TOOLS_VERSION }}

- name: Upload signed APK
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Read VERSION file
id: get_version
run: echo "::set-output name=version::$(cat VERSION/VERSION)"
run: echo "version=$(cat VERSION/VERSION)" >> $GITHUB_OUTPUT

- name: Create release
id: create_release
Expand Down
40 changes: 32 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,46 @@
# Bisq Notification Android App

Since Bisq is a desktop-based application, this Android app enables you to pair it with your desktop
application and receive important notifications such as trade updates and offer alerts when you are
not near your computer.

## How to Run
In order to pair the app and receive notifications, you will need to create your own
## Prerequisites

In order to pair the app and receive notifications, you will need to obtain an appropriate
`google-services.json` file and place it under the app/ directory. Refer to
[firebase documentation](https://firebase.google.com/docs/android/setup#add-config-file)
for more information.

> Note, the `google-services.json` file needs to correspond to the `fcmServiceAccountKey.json`
> used by the [bisq-relay](https://github.com/bisq-network/bisq-relay) service.
## Updating Dependencies

Whenever dependencies are updated/changed, it is necessary to update the following:

- [gradle/verification-metadata.xml](gradle/verification-metadata.xml) - can be updated using the
following command:

```shell
./gradlew --write-verification-metadata sha256 build :app:processDebugResources :app:connectedDebugAndroidTest
```

- [gradle.lockfile](gradle.lockfile) - can be updated using the following command:

```shell
./gradlew dependencies --write-locks
```

## Architectural Design

For information on the architectural design, refer to the
[Bisq Remote Specification](https://github.com/bisq-network/bisqremote/wiki/Specification).

## Screenshots
![Welcome](images/welcome.png)
![Scan Pairing Code](images/scan_pairing_code.png)
![Pairing Success](images/pairing_success.png)
![Notification List](images/notification_list.png)
![Offer Taken Details](images/offer_taken_details.png)
![Settings](images/settings.png)

<img alt="Welcome" src="images/welcome.png" width=40% height=40%>
<img alt="Scan Pairing Code" src="images/scan_pairing_code.png" width=40% height=40%>
<img alt="Pairing Success" src="images/pairing_success.png" width=40% height=40%>
<img alt="Notification List" src="images/notification_list.png" width=40% height=40%>
<img alt="Offer Taken Details" src="images/offer_taken_details.png" width=40% height=40%>
<img alt="Settings" src="images/settings.png" width=40% height=40%>
Loading

0 comments on commit 611d16d

Please sign in to comment.