Alexander Afanasyev | ccb373d | 2016-01-25 11:28:18 -0800 | [diff] [blame] | 1 | # Developer Notes |
| 2 | |
| 3 | ## Prerequisites |
| 4 | |
| 5 | - [Gradle build system version 2.10 or later](http://gradle.org/) |
| 6 | |
| 7 | ## Compile |
| 8 | |
| 9 | To compile: |
| 10 | |
| 11 | ./gradlew assemble |
| 12 | |
| 13 | Note: when compiling on Windows, replace `./gradlew` with `gradlew` or `gradlew.bat`. |
| 14 | |
| 15 | To build documentation: |
| 16 | |
| 17 | ./gradlew javadoc |
| 18 | |
| 19 | To build all artifacts and publish to a local maven repository: |
| 20 | |
| 21 | ./gradlew install |
| 22 | |
| 23 | To publish to maven repository `signing.keyId`, `signing.password`, `signing.secretKeyRingFile`, |
| 24 | `ossrhUsername`, and `ossrhPassword` variables need to be defined in project-specific or |
| 25 | user-specific `gradle.properties` file. After the variables defined, run the following command |
| 26 | to build, sign, and upload archives to maven: |
| 27 | |
| 28 | ./gradlew uploadArchives |
| 29 | |
| 30 | To get list of other targets, use `./gradlew tasks`. |
| 31 | |
| 32 | ## Tests |
| 33 | |
| 34 | The package contains two types of tests: unit and integration. The integration tests require |
| 35 | NFD instance to be running locally. |
| 36 | |
| 37 | ### Unit Tests |
| 38 | |
| 39 | To run unit tests: |
| 40 | |
| 41 | ./gradlew test |
| 42 | |
| 43 | To run a specific test or test case, use `--tests=<test-name>[.<test-case>]` command-line option. For example, |
| 44 | |
| 45 | ./gradlew test --tests *FaceStatusTest |
Alexander Afanasyev | a8bc0d8 | 2016-01-25 17:25:30 -0800 | [diff] [blame] | 46 | ./gradlew test --tests *FaceStatusTest.testEncode |
Alexander Afanasyev | ccb373d | 2016-01-25 11:28:18 -0800 | [diff] [blame] | 47 | |
| 48 | ### Integration Tests |
| 49 | |
| 50 | To run integration tests |
| 51 | |
| 52 | ./gradlew integrationTest |