mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-21 15:05:19 +00:00
Update BUILDING.md
This commit is contained in:
parent
4001714705
commit
dd1b40edb4
64
BUILDING.md
64
BUILDING.md
@ -8,30 +8,26 @@ Session uses [Gradle](http://gradle.org) 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.
|
||||
|
||||
Building Session
|
||||
Dependencies
|
||||
---------------
|
||||
You will need Java 8 set up on your machine.
|
||||
|
||||
The following steps should help you (re)build Session from the command line.
|
||||
|
||||
1. Checkout the session-android project source with the command:
|
||||
|
||||
git clone https://github.com/loki-project/session-android.git
|
||||
|
||||
2. Make sure you have the [Android SDK](https://developer.android.com/sdk/index.html) installed.
|
||||
3. Ensure that the following packages are installed from the Android SDK manager:
|
||||
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
|
||||
4. Create a local.properties file at the root of your source checkout and add an sdk.dir entry to it. For example:
|
||||
|
||||
In Android studio, this can be done 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. You may also need to install API version 28 in the SDK platforms tab.
|
||||
|
||||
You will then need to clone and run `./gradlew build` on each of the following repositories IN ORDER.
|
||||
|
||||
sdk.dir=/Application/android-sdk-macosx
|
||||
https://github.com/loki-project/loki-messenger-android-curve-25519
|
||||
https://github.com/loki-project/loki-messenger-android-protocol
|
||||
https://github.com/loki-project/loki-messenger-android-meta
|
||||
https://github.com/loki-project/session-android-service
|
||||
|
||||
5. Using Java 8
|
||||
|
||||
6. Execute Gradle:
|
||||
|
||||
./gradlew build
|
||||
This will build these depndencies into a common maven filepath which the main repo will then draw from. The easiest way to do this is to create new projects from git version control in Android Studio, allow Gradle to sort itself out, then run `./gradlew build`
|
||||
|
||||
Visual assets
|
||||
----------------------
|
||||
@ -45,20 +41,36 @@ pngs_from_svg.py ic_audio.svg /path/to/Session/res/ 150 --color #000 --opacity 0
|
||||
pngs_from_svg.py ic_audio.svg /path/to/Session/res/ 150 --color #fff --opacity 1.00 --suffix _light
|
||||
```
|
||||
|
||||
Setting up a development environment
|
||||
Setting up a development environment and building from Android Studio
|
||||
------------------------------------
|
||||
|
||||
[Android Studio](https://developer.android.com/sdk/installing/studio.html) is the recommended development environment.
|
||||
|
||||
1. Install Android Studio.
|
||||
2. 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.
|
||||
3. From the Quickstart panel, choose "Configure" then "SDK Manager".
|
||||
4. 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.
|
||||
5. From the Quickstart panel, choose "Checkout from Version Control" then "git".
|
||||
6. Paste the URL for the session-android project when prompted (https://github.com/loki-project/session-android.git).
|
||||
7. Android Studio should detect the presence of a project file and ask you whether to open it. Click "yes".
|
||||
9. Default config options should be good enough.
|
||||
9. Project initialisation and build should proceed.
|
||||
1. 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.
|
||||
2. From the Quickstart panel, choose "Checkout from Version Control" then "git".
|
||||
3. Paste the URL for the session-android project when prompted (https://github.com/loki-project/session-android.git).
|
||||
4. Android Studio should detect the presence of a project file and ask you whether to open it. Click "yes".
|
||||
5. Default config options should be good enough.
|
||||
6. Right now, we have kept the google-services.json file out of the public repository as it contains credentials for the firebase auth. We haven't yet made a way to build the app without this file or without firebase, as you don't technically need it to run the app. Email niels@loki.network to get this file for your build.
|
||||
7. Project initialisation and build should proceed.
|
||||
|
||||
Building Session from Command Line
|
||||
---------------
|
||||
|
||||
The following steps should help you (re)build Session from the command line one all dependencies have been aquired.
|
||||
|
||||
1. Checkout the session-android project source with the command:
|
||||
|
||||
git clone https://github.com/loki-project/session-android.git
|
||||
|
||||
2. Make sure you have the [Android SDK](https://developer.android.com/sdk/index.html) installed.
|
||||
3. 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
|
||||
|
||||
4. Execute Gradle:
|
||||
|
||||
./gradlew build
|
||||
|
||||
Contributing code
|
||||
-----------------
|
||||
|
Loading…
Reference in New Issue
Block a user