Support java annotation proccessors

The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS.  Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.

For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).

Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
(cherry picked from commit cde14987ba)
This commit is contained in:
Colin Cross
2017-04-07 16:28:41 -07:00
parent 9348d38d20
commit e8ee68bb9b
7 changed files with 41 additions and 9 deletions

View File

@@ -592,6 +592,17 @@ alphabetically.</p>
</ul>
</p>
<h4>LOCAL_ANNOTATION_PROCESSORS</h4>
<p>Set this to a list of modules built with <code>BUILD_HOST_JAVA_LIBRARY</code>
to have their jars passed to javac with -processorpath for use as annotation
processors.</p>
<h4>LOCAL_ANNOTATION_PROCESSOR_CLASSES</h4>
<p>Set this to a list of classes to be passed to javac as -processor arguments.
This list is would be unnecessary, as javac will autodetect annotation processor
classes, except that the Grok tool that is used on the Android source code
does not autodetect them and requires listing them manually.</p>
<h4>LOCAL_ASSET_FILES</h4>
<p>In Android.mk files that <code>include $(BUILD_PACKAGE)</code> set this
to the set of files you want built into your app. Usually:</p>