# How to Build AirVault from Source | AirVault Docs

> Build the Lensly and Lumio debug APKs and run the unit tests from source with Gradle, a JDK and the Android SDK, using a full git history.

Reference

# How to Build AirVault from Source

Build the Lensly and Lumio debug APKs and run the unit tests from source with Gradle, a JDK and the Android SDK, using a full git history.

## Before You Start

- A Java Development Kit (JDK) and the Android SDK.
- A full git history. Do not clone with `--depth 1`. Each app’s `versionCode` is the commit count, so the build needs every commit.

## Build and Test

Clone the Repository

Run these commands in a terminal:

sh

```
git clone https://github.com/al-shukran/airvault.git
cd airvault
```

Build the Debug APKs

Build Lensly and Lumio from the repository root:

sh

```
./gradlew :app:assembleDebug
./gradlew :lumio:assembleDebug
```

On Windows, run `gradlew.bat` with the same arguments.

Run the Unit Tests

sh

```
./gradlew :shared:testDebugUnitTest
./gradlew :app:testDebugUnitTest
./gradlew :lumio:testDebugUnitTest
```

To run one continuous integration partition on your machine, use `scripts/ci/run-partition.sh` with a partition name, for example `scripts/ci/run-partition.sh <partition>`. The [testing guide](https://github.com/al-shukran/airvault/blob/master/docs/testing/README.md) lists the partition names.

## Released APKs

The published APKs come from the release workflow, which builds them from tags named `lensly-v` or `lumio-v` followed by a version. A local build is not a published release. The `master` branch holds work that is not released yet, so run `git checkout lensly-v1.2.0` or `git checkout lumio-v1.0.0` before you build if you want the source of a release. To check a published APK, follow [How to Install and Verify AirVault](https://alshukran.com/docs/airvault/install/).

## Before You Contribute

Read the [contributing guide](https://github.com/al-shukran/airvault/blob/master/CONTRIBUTING.md) before you open a pull request. It covers the Contributor License Agreement, the Developer Certificate of Origin (sign off every commit with `git commit -s`), changelog fragments and pull request labels.

## Next Steps

Check the repository’s [README](https://github.com/al-shukran/airvault/blob/master/README.md) for the repository layout. To report a security problem you find in the code, follow [How to Report a Security Vulnerability](https://alshukran.com/docs/airvault/report-a-vulnerability/).

---
Source: https://alshukran.com/docs/airvault/build-from-source/
