@@ -36,6 +36,32 @@ cd android-custom-lint-rules
36
36
For Android Studio 3.x and above, use the sample in ` android-studio-3 ` .
37
37
If you are targeting Android Studio 2.x and older, use the sample in ` android-studio-2 ` .
38
38
39
+ ##### Lint Dependencies
40
+
41
+ When building your own rules, you will likely want to know which dependencies you should bring into your own project.
42
+ The below descriptions of the dependencies included within this project serve to help you make that decision:
43
+
44
+ Source Dependencies
45
+
46
+ - ** com.android.tools.lint: lint-api ** : The most important one; it contains things like ` LintClient ` , the ` Detector `
47
+ base class, the ` Issue ` class, and everything else that Lint checks rely on in the Lint framework.
48
+ - ** com.android.tools.lint: lint-checks ** : Contains the built-in checks that are developed internally. Also contains
49
+ utilities that are sometimes useful for other lint checks, such as the ` VersionChecks ` class (which figures out whether
50
+ a given UAST element is known to only be called at a given API level, either by surrounding ` if >= SDK-version ` checks or
51
+ ` if < SDK-version ` early returns in the method).
52
+
53
+ Test Dependencies
54
+
55
+ - ** com.android.tools.lint: lint-tests ** : Contains useful utilities for writing unit tests for Lint checks,
56
+ including the ` LintDetectorTest ` base class.
57
+ - ** com.android.tools: testutils ** : It's unlikely that you need to depend on this directly. The test infrastructure
58
+ depends on it indirectly though (the methods we use there were mostly for the older lint test infrastructure,
59
+ not the newer one).
60
+ - ** com.android.tools.lint: lint ** : Lint checks don't need to depend on this. It's a separate artifact used by tools
61
+ that want to integrate lint with the command line, such as the Gradle integration of lint. This is where things like
62
+ terminal output, HTML reporting, command line parsing etc is handled.
63
+
64
+
39
65
Support
40
66
-------
41
67
0 commit comments