Merge "Run ErrorProne in OpenJDK9"

am: 264bc07791

Change-Id: I3ce7202cdcfd3e86fbccb359f56ca59581855a04
This commit is contained in:
Colin Cross
2018-06-21 13:57:20 -07:00
committed by android-build-merger
4 changed files with 13 additions and 18 deletions

View File

@@ -193,16 +193,25 @@ ifdef need_compile_java
annotation_processor_flags :=
annotation_processor_deps :=
annotation_processor_jars :=
# If error prone is enabled then add LOCAL_ERROR_PRONE_FLAGS to LOCAL_JAVACFLAGS
ifeq ($(RUN_ERROR_PRONE),true)
annotation_processor_jars += $(ERROR_PRONE_JARS)
LOCAL_JAVACFLAGS += $(ERROR_PRONE_FLAGS)
LOCAL_JAVACFLAGS += '-Xplugin:ErrorProne $(ERROR_PRONE_CHECKS) $(LOCAL_ERROR_PRONE_FLAGS)'
endif
ifdef LOCAL_ANNOTATION_PROCESSORS
annotation_processor_jars := $(call java-lib-files,$(LOCAL_ANNOTATION_PROCESSORS),true)
annotation_processor_flags += -processorpath $(call normalize-path-list,$(annotation_processor_jars))
annotation_processor_deps += $(annotation_processor_jars)
annotation_processor_jars += $(call java-lib-files,$(LOCAL_ANNOTATION_PROCESSORS),true)
# b/25860419: annotation processors must be explicitly specified for grok
annotation_processor_flags += $(foreach class,$(LOCAL_ANNOTATION_PROCESSOR_CLASSES),-processor $(class))
endif
annotation_processor_jars :=
ifneq (,$(strip $(annotation_processor_jars)))
annotation_processor_flags += -processorpath $(call normalize-path-list,$(annotation_processor_jars))
annotation_processor_deps += $(annotation_processor_jars)
endif
full_static_java_libs := $(call java-lib-files,$(LOCAL_STATIC_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))