Skip to content
Snippets Groups Projects
building.md 2.69 KiB
Newer Older
---
aliases:
- /building
- /building.html
title: Building the Source Code
---

Cleopatra's avatar
Cleopatra committed
1\) Download and install [Android Studio](http://developer.android.com/sdk/index.html).
Cleopatra's avatar
Cleopatra committed
2\) Launch Android Studio and select **Get from Version Control** from the Welcome Screen.

![](/img/building/02.png)
Cleopatra's avatar
Cleopatra committed
3\) Another screen pops up. Ensure that **Version control** is set to **Git**. 

![](/img/building/03.png)
Cleopatra's avatar
Cleopatra committed
4\) Enter **https://code.briarproject.org/briar/briar.git** as the **URL**, then click **Clone**.

![](/img/building/04.png)

This process may take a bit, and you should see a dialog similar to this.

Cleopatra's avatar
Cleopatra committed
![](/img/building/04-2.png)
Cleopatra's avatar
Cleopatra committed
5\) When the source code has downloaded, components will be loaded and the project will open in an Android Studio workspace.
Cleopatra's avatar
Cleopatra committed
6\) Wait for Gradle to sync. 
Cleopatra's avatar
Cleopatra committed
You may be unable to successfully build Briar due to the error: *It is not fully supported to define distributionSha256Sum in gradle/wrapper/gradle-wrapper.properties...*
Cleopatra's avatar
Cleopatra committed
To resolve this error, click the link that says **Use "c9910513d..." as checksum for https://services.gradle.org/distributions/gradle-6.5-all.zip and sync project** from the Event Log.
Cleopatra's avatar
Cleopatra committed
It takes several minutes to download, install, verify and configure the required packages and tools. If the sync process fails at any point, select **Sync project with Gradle Files** from the **File** menu to restart the process. 
Cleopatra's avatar
Cleopatra committed
![](/img/building/06.png)
Cleopatra's avatar
Cleopatra committed
7\) When Gradle sync is complete, select **Build** > **Build Bundle(s)/APK(s)** > **Build APK(s)** from the Android Studio menu.

![](/img/building/7.png)

Cleopatra's avatar
Cleopatra committed
8\) When the build process finishes, click **locate** from the Event Log to open the folder containing the APK file, **briar-android-official-debug.apk**. See the [Android Studio documentation](https://developer.android.com/studio/run/device) for instructions on how to run the app.
Cleopatra's avatar
Cleopatra committed

![](/img/building/8.png)

## Updating

9\) Briar is under constant development, so you should check for updates
regularly. To get the latest version of the source code, select **VCS** > **Update Project**.

![](/img/building/09.png)
Alternatively, you can also use the **Update Project** button on the toolbar:

![](/img/building/09-2.png)

Cleopatra's avatar
Cleopatra committed
10\) Choose whether to "Merge incoming changes into the current branch" or to "Rebase the current branch on top of incoming changes" and click **OK** to proceed.

![](/img/building/10.png)
Cleopatra's avatar
Cleopatra committed
11\) Repeat steps 7 and 8 to build and install the updated app.

If you’re interested in getting involved or following the progress of the project, please [join the development mailing list](https://lists.sourceforge.net/lists/listinfo/briar-devel), [IRC channel](https://webchat.freenode.net/#briar) or [Mattermost channel](https://chat.briarproject.org/briar/channels/town-square).