[Android] Re-enable custom errorprone plugins

The custom Chromium errorprone plugins were unintentionally disabled
as a result of
https://chromium-review.googlesource.com/c/chromium/src/+/2133870

This CL re-enables the errorprone plugins by using the
auto_service_processor in the javac compile of the
errorprone_plugin java_binary. This preserves the META-INF service
provider configuration generated by auto_service_processor.

This CL:
- Adds the 'processor_generates_service_provider_configuration'
parameter to the java_annotation_processor() template to indicate
whether the annotation processor generates the META-INF service provider
configuration files. If a library depends on an annotation processor
which has the parameter set, the annotation processor will be
passed in the --processorpath and --processor parameters in the javac
compile in addition to the turbine compile.
- Adds the 'errorprone_stderr_path' to the java_library() template to
save the stderr output of the errorprone compile to a file.

BUG=1104558
TEST=errorprone_plugin:tests

Change-Id: If224e9a2cb62b3fae72ffb6664aa54770530672d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2291983
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788647}
GitOrigin-RevId: b8c6444fbfead99b92e5419bf5c81cf7813673c3
2 files changed
tree: 41486f6d0a81d094af209f4789b54967cc076b54
  1. src/
  2. test/
  3. BUILD.gn
  4. OWNERS