blob: c070b2a1a278b5fffe117b1275f3fb17992afde0 [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
Alexander Afanasyeva8d404b2016-11-05 10:07:08 -06008 ndk.dir=/opt/crystax-ndk-10.3.1
Alexander Afanasyevbd74ad22016-01-06 18:09:10 -08009 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
Alexander Afanasyeva8d404b2016-11-05 10:07:08 -060019 NDK_DEBUG=1 ./gradlew assembleDebug
Alexander Afanasyevbd74ad22016-01-06 18:09:10 -080020
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
Alexander Afanasyeva8d404b2016-11-05 10:07:08 -060026 ./gradlew assembleDebug
Alexander Afanasyevbd74ad22016-01-06 18:09:10 -080027
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).