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