blob: a9210b1b39b3e5fd9a8812b3a6d6aec671233a9e [file] [log] [blame] [view]
Alexander Afanasyevbd74ad22016-01-06 18:09:10 -08001Developer Notes
2===============
3
4## To build debug version of NFD
5
6Configure `ndk.dir` and `sdk.dir` in `local.properties` file. For example:
7
8 ndk.dir=/opt/crystax-ndk-10.2.1
9 sdk.dir=/opt/android-sdk-macosx
10
11Alternatively, you can set `ANDROID_NDK_ROOT` environment variable to point towards NDK folder.
12
13Build process can be customized using several environment variables:
14
15- `NDK_DEBUG`
16
17 If set, the native code is built in debug mode. For example:
18
19 NDK_DEBUG=1 build assembleDebug
20
21- `NDK_BUILD_ABI=<comma-separated-list-of-platforms>`
22
23 If set, the native code is built only for the specified platforms. For example, the following snippet will build NFD only for x86 platform:
24
25 export NDK_BUILD_ABI=x86
26 build assembleDebug
27
28- `NDK_BUILD_PARALLEL=<number>`
29
30 If set, the build will be limited with the specified number of parallel builds. Otherwise, the build will be automatically parallelized based on the number of available CPUs.
31
32## To build the release version of NFD
33
34In order to build the release version of NFD, it needs to be properly signed. In order to specify keystore, keystore's password, key in the keystore, and key's password, add the following configuration into `local.properties` file:
35
36
37 keystore=<path-to-.keystore-file>
38 keystore.password=<keystore-password>
39 keystore.key.alias=<key-alias-in-keystore>
40 keystore.key.password=<key-password>
41
42For more information about application signing and instructions on how to generate keys, refer to [Android Documentation](http://developer.android.com/tools/publishing/app-signing.html).
43
44## To publish the release version on Google Play
45
46The release version of NFD can be automatically uploaded to Google Play, if Google Play parameters are configured in `local.properties` files:
47
48 google-play=<path-to-json-config>
49
50Note that `.json` config can be downloaded from Google Developer Console. For more information, refer to [Google Play Publishing Plugin](https://github.com/Triple-T/gradle-play-publisher).