Session 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.
You will need Java 8 set up on your machine.
Ensure that the following packages are installed from the Android SDK manager:
- Android SDK Build Tools (see buildToolsVersion in build.gradle)
- SDK Platform (all API levels)
- Android Support Repository
- Google Repository
In Android studio, this can be done from the Quickstart panel. Just choose "Configure", then "SDK Manager". In the SDK Tools tab of the SDK Manager, make sure that "Android Support Repository" is installed, and that the latest "Android SDK build-tools" are installed. Click "OK" to return to the Quickstart panel. You may also need to install API version 28 in the SDK platforms tab.
Android Studio is the recommended development environment.
- 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 "Checkout from Version Control" then "git".
- Paste the URL for the session-android project when prompted (https://github.com/oxen-io/session-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 initialization and building should proceed.
- Clone submodules with
git submodule update --init --recursive
If you would like to build the Huawei Flavor with Huawei HMS push notifications you will need to pass 'huawei' as a command line arg to include the required dependencies.
e.g. ./gradlew assembleHuaweiDebug -Phuawei
If you are building in Android Studio then add -Phuawei
to Preferences > Build, Execution, Deployment > Gradle-Android Compiler > Command-line Options
Code contributions should be sent via Github as pull requests, from feature branches as explained here.