Run ErrorProne in OpenJDK9
Run ErrorProne as a processor in javac from OpenJDK9. Bug: 69485063 Test: m RUN_ERROR_PRONE=true javac-check Change-Id: I2dde597430b47c440df22d248809233a6ade1625
This commit is contained in:
parent
560890b29f
commit
e46727a2ba
|
@ -730,11 +730,7 @@ ANDROID_MANIFEST_MERGER := $(JAVA) \
|
|||
COLUMN:= column
|
||||
|
||||
ifeq ($(EXPERIMENTAL_USE_OPENJDK9),)
|
||||
ifeq ($(RUN_ERROR_PRONE),true)
|
||||
USE_OPENJDK9 :=
|
||||
else
|
||||
USE_OPENJDK9 := true
|
||||
endif
|
||||
TARGET_OPENJDK9 :=
|
||||
else ifeq ($(EXPERIMENTAL_USE_OPENJDK9),false)
|
||||
USE_OPENJDK9 :=
|
||||
|
|
|
@ -48,8 +48,3 @@ endif
|
|||
|
||||
LOCAL_INTERMEDIATE_SOURCE_DIR := $(intermediates.COMMON)/src
|
||||
LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))
|
||||
|
||||
# If error prone is enabled then add LOCAL_ERROR_PRONE_FLAGS to LOCAL_JAVACFLAGS
|
||||
ifeq ($(RUN_ERROR_PRONE),true)
|
||||
LOCAL_JAVACFLAGS += $(LOCAL_ERROR_PRONE_FLAGS)
|
||||
endif
|
||||
|
|
|
@ -227,11 +227,6 @@ $(full_classes_compiled_jar): PRIVATE_WARNINGS_ENABLE := $(LOCAL_WARNINGS_ENABLE
|
|||
# Deps for generated source files must be handled separately,
|
||||
# via deps on the target that generates the sources.
|
||||
|
||||
# If error prone is enabled then add LOCAL_ERROR_PRONE_FLAGS to LOCAL_JAVACFLAGS
|
||||
ifeq ($(RUN_ERROR_PRONE),true)
|
||||
LOCAL_JAVACFLAGS += $(LOCAL_ERROR_PRONE_FLAGS)
|
||||
endif
|
||||
|
||||
# For user / userdebug builds, strip the local variable table and the local variable
|
||||
# type table. This has no bearing on stack traces, but will leave less information
|
||||
# available via JDWP.
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue