summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-04-19 12:52:14 +0200
committerAlbin <albin@mullvad.net>2023-04-24 16:29:36 +0200
commit21dc63a714d8a6d40fa314ea1845cf092dece421 (patch)
tree8d97cd606daa31b203967b8ef92280f4ed2c0f1c
parent14336f7be60df5ae5d18f72273e3e09292907775 (diff)
downloadmullvadvpn-21dc63a714d8a6d40fa314ea1845cf092dece421.tar.xz
mullvadvpn-21dc63a714d8a6d40fa314ea1845cf092dece421.zip
Update build instructions
-rw-r--r--android/BuildInstructions.md48
1 files changed, 41 insertions, 7 deletions
diff --git a/android/BuildInstructions.md b/android/BuildInstructions.md
index c86dc353c7..8ab2da6d20 100644
--- a/android/BuildInstructions.md
+++ b/android/BuildInstructions.md
@@ -9,10 +9,11 @@ environment.
The build process consist of two main steps. First building the native libraries (`mullvad-daemon`
and `wireguard-go`) and then building the Android app/project which will bundle the previously built
native libraries. Building the native libraries requires some specific toolchains and packages to be
-installed, so it's recommended to build using the provided build script and container image. The
-native libraries doesn't have to be rebuilt very often, only when including daemon changes or after
-cleaning the project, so apart from that it's possible to build using the Gradle CLI or
-the Android Studio GUI.
+installed, so it's recommended to build using the provided build script and container image.
+
+The native libraries doesn't have to be rebuilt very often, only when including daemon changes or
+after cleaning the project, so apart from that it's possible to build the Android app/project using
+the Gradle CLI or the Android Studio GUI.
## Build with provided container (recommended)
@@ -20,9 +21,24 @@ Building both the native libraries and Android project can easily be achieved by
[containerized-build.sh](../building/containerized-build.sh) script, which helps using the correct
tag and mounting volumes. The script relies on [podman](https://podman.io/getting-started/installation.html)
by default, however another container runner such as [docker](https://docs.docker.com/get-started/)
-can be used by setting the `CONTAINER_RUNNER` environment variable. Subsequent builds can that
-doesn't rely on changes to the native libraries can be ran using the Gradle CLI or the Android
-Studio GUI.
+can be used by setting the `CONTAINER_RUNNER` environment variable.
+
+After the native libraries have been built, subsequent builds can that doesn't rely on changes to
+the native libraries can be ran using the Gradle CLI or the Android Studio GUI. This requires
+either:
+* Rust to be installed, since a tooled called `mullvad-version` is used to resolved the version
+ information for the Android app.
+
+or
+
+* Specifying custom version information by following [these instructions](#override-version-code-and-version-name).
+
+### Setup:
+
+- Install [podman](https://podman.io/getting-started/installation.html) and make sure it's
+ configured to run in rootless mode.
+
+- OPTIONAL: Get the latest **stable** Rust toolchain via [rustup.rs](https://rustup.rs/).
### Debug build
Run the following command to trigger a full debug build:
@@ -202,3 +218,21 @@ This is easiest done by temporarily removing the lockfile:
```bash
rm ./gradle/verification-metadata.xml
```
+
+## Gradle properties
+Some gradle properties can be set to simplify development. These are listed below.
+
+### Always show changelog
+For development purposes, `ALWAYS_SHOW_CHANGELOG` can be set in `local.properties` to always show
+the changelog dialog on each app start. For example:
+```
+ALWAYS_SHOW_CHANGELOG=true
+```
+
+### Override version code and version name
+To avoid or override the rust based version generation, the `OVERRIDE_VERSION_CODE` and
+`OVERRIDE_VERSION_NAME` properties can be set in `local.properties`. For example:
+```
+OVERRIDE_VERSION_CODE=123
+OVERRIDE_VERSION_NAME=1.2.3
+```