Signal uses Gradle to build the project and to maintain
dependencies. However, you needn't install it yourself; the
"gradle wrapper" gradlew
, mentioned below, will do that for you.
The following steps should help you (re)build Signal from the command line.
-
Checkout the Signal-Android project source with the command:
git clone https://github.com/WhisperSystems/Signal-Android.git
-
Make sure you have the Android SDK installed.
-
Ensure that the following packages are installed from the Android SDK manager:
- Android SDK Build Tools (see buildToolsVersion in build.gradle)
- SDK Platform (API level 22)
- Android Support Repository
- Google Repository
-
Create a local.properties file at the root of your source checkout and add an sdk.dir entry to it. For example:
sdk.dir=/Application/android-sdk-macosx
-
Execute Gradle:
./gradlew build
Source assets tend to be large binary blobs, which are best stored outside of git repositories. We host ours in a Pixelapse repository. Some source files are SVGs that can be auto-colored and sized using a tool like android-res-utils.
Sample command for generating our audio placeholder image:
pngs_from_svg.py ic_audio.svg /path/to/Signal/res/ 150 --color #000 --opacity 0.54 --suffix _light
pngs_from_svg.py ic_audio.svg /path/to/Signal/res/ 150 --color #fff --opacity 1.00 --suffix _light
Android Studio is the recommended development environment.
- Install Android Studio.
- Open Android Studio. On a new installation, the Quickstart panel will appear. If you have open projects, close them using "File > Close Project" to see the Quickstart panel.
- From the Quickstart panel, choose "Configure" then "SDK Manager".
- In the SDK Tools tab of the SDK Manager, make sure that the "Android Support Repository" is installed, and that the latest "Android SDK build-tools" are installed. Click "OK" to return to the Quickstart panel.
- From the Quickstart panel, choose "Checkout from Version Control" then "git".
- Paste the URL for the Signal-Android project when prompted (https://github.com/WhisperSystems/Signal-Android.git).
- Android studio should detect the presence of a project file and ask you whether to open it. Click "yes".
- Default config options should be good enough.
- Project initialisation and build should proceed.
Code contributions should be sent via github as pull requests, from feature branches as explained here.
Development discussion happens on the whispersystems mailing list. To join Send emails to whispersystems@lists.riseup.net