Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 3.18 KB

README.md

File metadata and controls

79 lines (57 loc) · 3.18 KB

Mullvad VPN Android app

This directory contains the Android project as well as related files and information. Apart from the content of this directory, the Android project also relies on building wireguard-go and the mullvad-daemon which are both bundled as shared libraries into the assembled APK.

The app is available for download on our website, GitHub Releases, F-Droid and Google Play.

Quick start

Browsing the source code

The content in this directory (<repository-root>/android) follows a standard Android project structure and can therefore be opened in Android Studio or any other IDE or editor of your choice.

Building the app

The easiest and recommended way to build the Android project including the mullvad-daemon and wireguard-go is to use the following command (which requires podman):

../building/containerized-build.sh android --dev-build

See the build instructions for further information.

Linting and formatting

Kotlin formatting

ktfmt is used for kotlin formatting.

See the official documentation for how to use it as default formatter in Android Studio. Ensure to set kotlinLangStyle as "Code Style" and to set the project to rely on the EditorConfig (.editorconfig file).

Also, see the ktfmt gradle plugin documentation for how to use it as a gradle task.

XML formatting

In order to format XML files, the script scripts/tidy.sh is used. As the script name implies, it's basically a helper script to run the tool called tidy. It needs to be installed unless the container image is used.

Command to format:

scripts/tidy.sh format

Command to format and check for any changes:

scripts/tidy.sh formatAndCheckDiff

macOS

Since macOS is using a different version of sed running the tidy script (scripts/tidy.sh) will lead to the creation of a large number of files ending with -e. The recommended fix for this issue is to install the gnu version of sed. This can be done by running: brew install gnu-sed and then set gnu-sed as your default sed.

Android Gradle Plugin lint tool

The Android Gradle Plugin lint tool for linting of resources and code. The tool is configured to be strict. See each build.gradle.ktsfor more information.

Translations and localization

See the locale README for how to easily update translations. It also includes documentation for which phrases and terms shouldn't be translated (Do Not Translate). Also see the translations converter README for documentation about the tool used to sync translations between the Android and Desktop apps.

Icons and assets

For a general overview of icons and graphics read the graphics readme.