|
1 |
| -This file is meant to help contributors working on the project. Please see the https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/wiki/Contributing-&-Debugging[wiki] for more detailed information. |
| 1 | +This document is meant to help contributors working on the project. |
| 2 | +For more detailed information, please refer to the https://github.com/autonomousapps/dependency-analysis-gradle-plugin/wiki/Contributing-&-Debugging[project wiki]. |
| 3 | + |
| 4 | +== Required Tools |
| 5 | + |
| 6 | +- Android SDK |
| 7 | +- JDK 8, 11, 17 |
| 8 | + |
| 9 | +=== Android SDK Setup |
| 10 | + |
| 11 | +If you haven't installed the Android SDK locally, you can do so for macOS using Homebrew: |
| 12 | + |
| 13 | +---- |
| 14 | +brew install android-commandlinetools |
| 15 | +---- |
| 16 | + |
| 17 | +Then, set the `ANDROID_HOME` environment variable in your shell by adding the following line to your profile file |
| 18 | +(e.g., `.zshrc`, `.bash_profile`, `.bashrc`): |
| 19 | + |
| 20 | +> The `ANDROID_HOME` path is where `android-commandlinetools` gets installed to by Homebrew |
| 21 | + |
| 22 | +---- |
| 23 | +export ANDROID_HOME="/<path>/<to>/<your>/android-commandlinetools" |
| 24 | +---- |
| 25 | + |
| 26 | +> IMPORTANT - Make sure to restart IntelliJ after `ANDROID_HOME` is set, |
| 27 | +otherwise, tests will continue to fail when invoked via IntelliJ. |
| 28 | + |
| 29 | +== Install to Maven Local |
| 30 | + |
| 31 | +To install the project to Maven Local, run the following command: |
2 | 32 |
|
3 |
| -== Install to maven local |
4 | 33 | ----
|
5 | 34 | ./gradlew installForFuncTest
|
6 | 35 | ----
|
7 |
| -== Run the tests |
8 |
| -To run all the checks: |
| 36 | + |
| 37 | +== Running Tests |
| 38 | + |
| 39 | +To execute all checks, run: |
| 40 | + |
9 | 41 | ----
|
10 | 42 | ./gradlew check
|
11 | 43 | ----
|
12 |
| -=== Unit tests |
| 44 | + |
| 45 | +=== Unit Tests |
| 46 | + |
| 47 | +Run unit tests with the following command: |
| 48 | + |
13 | 49 | ----
|
14 | 50 | ./gradlew test
|
15 | 51 | ----
|
16 |
| -=== Functional tests |
17 |
| -This runs all the functional tests against the full test matrix (all supported versions of AGP and |
18 |
| -Gradle). Please be aware this can take a long time. |
| 52 | + |
| 53 | +=== Functional Tests |
| 54 | + |
| 55 | +To run all functional tests against the full test matrix (all supported versions of AGP and Gradle), use the following (please be aware, this can take a long time): |
| 56 | + |
19 | 57 | ----
|
20 | 58 | ./gradlew functionalTest
|
21 | 59 | ----
|
22 |
| -This runs all the functional tests against only the latest-support combination of AGP and Gradle. |
| 60 | + |
| 61 | +For a quicker run against the latest-supported combination of AGP and Gradle, use: |
| 62 | + |
23 | 63 | ----
|
24 | 64 | ./gradlew functionalTest -DfuncTest.quick
|
25 | 65 | ----
|
26 |
| -or |
| 66 | + |
| 67 | +Alternatively: |
| 68 | + |
27 | 69 | ----
|
28 | 70 | ./gradlew quickFunctionalTest
|
29 | 71 | ----
|
30 |
| -> Protip. You can also use `./gradlew qFT` and save yourself some typing. |
31 | 72 |
|
32 |
| -If you want to run tests against only a subset of the suite, use Gradle's `--tests` option |
33 |
| -https://docs.gradle.org/current/userguide/java_testing.html#simple_name_pattern[support]: |
| 73 | +> Pro tip: You can also use `./gradlew qFT` for brevity. |
| 74 | + |
| 75 | +To run tests against a specific subset of the suite, use Gradle's `--tests` |
| 76 | +https://docs.gradle.org/current/userguide/java_testing.html#simple_name_pattern[option]. |
| 77 | +For example: |
| 78 | + |
34 | 79 | ----
|
35 | 80 | ./gradlew functionalTest --tests AnnotationProcessorSpec
|
36 | 81 | ----
|
37 |
| -You can combine quick tests with test filtering, but you must use the more verbose quick-test |
38 |
| -syntax: |
| 82 | + |
| 83 | +For a combination of quick tests and test filtering, use the more verbose quick-test syntax: |
| 84 | + |
39 | 85 | ----
|
40 | 86 | ./gradlew functionalTest --tests AnnotationProcessorSpec -DfuncTest.quick
|
41 |
| ----- |
| 87 | +---- |
0 commit comments