Skip to content

Commit

Permalink
frontend/android: create new android id for lnalpha
Browse files Browse the repository at this point in the history
Now it is possible to compile the app using separated Android app
id, which allows the LN app to co-exhists with the debug one.

`make android-ln` to compile it,
`make deploy-ln` to install through adb.
  • Loading branch information
Beerosagos committed Dec 3, 2024
1 parent ae9c842 commit 2b4429a
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ jobs:
~/.gradle/caches
~/.gradle/wrapper
- name: Build Android
run: ./scripts/github-ci.sh android
run: ./scripts/github-ci.sh android-ln
env:
OS_NAME: linux
- name: Upload APK
id: upload
uses: actions/upload-artifact@v4
with:
path: frontends/android/BitBoxApp/app/build/outputs/apk/debug/app-debug.apk
name: BitBoxApp-android-${{github.sha}}.apk
path: frontends/android/BitBoxApp/app/build/outputs/apk/lnalpha/app-lnalpha.apk
name: BitBoxApp-android-ln-${{github.sha}}.apk
if-no-files-found: error
qt-linux:
runs-on: ubuntu-22.04
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ qt-windows:
android:
$(MAKE) buildweb
cd frontends/android && ${MAKE} apk-debug
android-ln:
$(MAKE) buildweb
cd frontends/android && ${MAKE} apk-ln
ios:
cd frontends/ios && ${MAKE} build
osx-sec-check:
Expand Down
16 changes: 16 additions & 0 deletions frontends/android/BitBoxApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,30 @@ android {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "string", "app_name", "BitBoxApp"
manifestPlaceholders = [
appName: "BitBoxApp",
appIcon: "@mipmap/ic_launcher",
appRoundIcon: "@mipmap/ic_launcher_round",
]
}
debug {
applicationIdSuffix ".debug"
resValue "string", "app_name", "BitBoxApp DEBUG"
manifestPlaceholders = [
appName: "BitBoxApp DEBUG",
appIcon: "@mipmap/ic_launcher",
appRoundIcon: "@mipmap/ic_launcher_round",
]
}
lnalpha {
applicationIdSuffix ".lnalpha"
resValue "string", "app_name", "BitBoxApp LN Alpha"
manifestPlaceholders = [
appName: "BitBoxApp LN Alpha",
appIcon: "@mipmap/ic_launcher_lnalpha",
appRoundIcon: "@mipmap/ic_launcher_lnalpha_round",
]
signingConfig signingConfigs.debug // Use debug signing
}
}
namespace 'ch.shiftcrypto.bitboxapp'
Expand Down
6 changes: 3 additions & 3 deletions frontends/android/BitBoxApp/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="${appName}"
android:icon="${appIcon}"
android:roundIcon="${appRoundIcon}"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<!-- This tag might be required when interacting with Google Play Services, see https://developers.google.com/android/guides/setup. -->
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions frontends/android/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ include ../../android-env.mk.inc
apk-debug:
${MAKE} prepare-android
cd BitBoxApp && ./gradlew assemble
apk-ln:
${MAKE} prepare-android
cd BitBoxApp && ./gradlew assembleLnalpha
deploy-debug:
adb install -r ./BitBoxApp/app/build/outputs/apk/debug/app-debug.apk
deploy-ln:
adb install -r ./BitBoxApp/app/build/outputs/apk/lnalpha/app-lnalpha.apk
clean:
cd BitBoxApp && ./gradlew clean
prepare-android:
Expand Down

0 comments on commit 2b4429a

Please sign in to comment.