Skip to content

Commit f022681

Browse files
tbcrawfordautonomousapps
authored andcommitted
Add Android SDK setup to CONTRIBUTING documentation
1 parent 016aea3 commit f022681

File tree

1 file changed

+62
-16
lines changed

1 file changed

+62
-16
lines changed

CONTRIBUTING.asciidoc

+62-16
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,87 @@
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:
232

3-
== Install to maven local
433
----
534
./gradlew installForFuncTest
635
----
7-
== Run the tests
8-
To run all the checks:
36+
37+
== Running Tests
38+
39+
To execute all checks, run:
40+
941
----
1042
./gradlew check
1143
----
12-
=== Unit tests
44+
45+
=== Unit Tests
46+
47+
Run unit tests with the following command:
48+
1349
----
1450
./gradlew test
1551
----
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+
1957
----
2058
./gradlew functionalTest
2159
----
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+
2363
----
2464
./gradlew functionalTest -DfuncTest.quick
2565
----
26-
or
66+
67+
Alternatively:
68+
2769
----
2870
./gradlew quickFunctionalTest
2971
----
30-
> Protip. You can also use `./gradlew qFT` and save yourself some typing.
3172

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+
3479
----
3580
./gradlew functionalTest --tests AnnotationProcessorSpec
3681
----
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+
3985
----
4086
./gradlew functionalTest --tests AnnotationProcessorSpec -DfuncTest.quick
41-
----
87+
----

0 commit comments

Comments
 (0)