Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update F-Droid local build flow to capture APK outputs (#1405)

Leendert de Borstb5edc6ef76b0
diff --git a/apps/mobile-app/android/fdroid/docker-compose.yml b/apps/mobile-app/android/fdroid/docker-compose.yml
index 3985e118e..52c68d2ab 100644
--- a/apps/mobile-app/android/fdroid/docker-compose.yml
+++ b/apps/mobile-app/android/fdroid/docker-compose.yml
@@ -14,6 +14,8 @@ services:
- ./net.aliasvault.app.yml:/net.aliasvault.app.yml
# Add build script to the container
- ./scripts/build.sh:/build.sh:Z
+ # Bind the outputs directory to capture APK build output
+ - ./outputs:/outputs:rw
# Increase memory limits for Gradle builds
shm_size: '2gb'
mem_limit: 12g
diff --git a/apps/mobile-app/android/fdroid/run.sh b/apps/mobile-app/android/fdroid/run.sh
index 3b843a69d..da4b5fd9d 100755
--- a/apps/mobile-app/android/fdroid/run.sh
+++ b/apps/mobile-app/android/fdroid/run.sh
@@ -2,6 +2,10 @@
set -e # Exit on any error, except where explicitly ignored
trap 'echo "🛑 Interrupted. Exiting..."; exit 130' INT # Handle Ctrl+C cleanly
+# Create outputs bind dir and set correct permissions
+mkdir -p outputs
+sudo chown -R 1000:1000 outputs
+
# Build and run the Docker environment
echo "Building Docker images..."
if ! docker compose build; then
diff --git a/apps/mobile-app/android/fdroid/scripts/build.sh b/apps/mobile-app/android/fdroid/scripts/build.sh
index 7df37dbd9..e90a5cd4d 100755
--- a/apps/mobile-app/android/fdroid/scripts/build.sh
+++ b/apps/mobile-app/android/fdroid/scripts/build.sh
@@ -23,4 +23,7 @@ fdroid fetchsrclibs net.aliasvault.app --verbose
# Format build receipe
fdroid rewritemeta net.aliasvault.app
# Build app and scan for any binary files that are prohibited
-fdroid build --verbose --latest --scan-binary --on-server --no-tarball net.aliasvault.app
\ No newline at end of file
+fdroid build --verbose --latest --scan-binary --on-server --no-tarball net.aliasvault.app
+
+# Copy any outputs to the bind mount folder
+rsync -avh /home/vagrant/build/build/net.aliasvault.app/apps/mobile-app/android/app/build/outputs/ /outputs/