Replace custom annotation processor handling

Use LOCAL_ANNOTATION_PROCESSORS instead of custom annotation
processor handling.

Test: m -j java
Change-Id: Icbc0fe23c584bfa10eaf20f87edc268e2e3d0c7c
diff --git a/Android.mk b/Android.mk
index d65a198..8c5c5ee 100644
--- a/Android.mk
+++ b/Android.mk
@@ -14,9 +14,6 @@
 
 LOCAL_PATH := $(call my-dir)
 
-# Include definitions of DAGGER2_PROCESSOR_CLASSES/LIBRARIES
-include external/dagger2/dagger2_annotation_processor.mk
-
 # build caliper host jar
 # ============================================================
 
@@ -42,17 +39,12 @@
   guavalib
 
 # Use Dagger2 annotation processor
-PROCESSOR_LIBRARIES := $(DAGGER2_PROCESSOR_LIBRARIES)
-PROCESSOR_CLASSES := $(DAGGER2_PROCESSOR_CLASSES)
-include external/dagger2/java_annotation_processors.mk
+LOCAL_ANNOTATION_PROCESSORS := dagger2-compiler-host
+LOCAL_ANNOTATION_PROCESSOR_CLASSES := dagger.internal.codegen.ComponentProcessor
 
 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
 include $(BUILD_HOST_JAVA_LIBRARY)
 
-# Remember the location of the generated files, this is needed for when
-# building for target
-caliper_host_generated_sources_dir := $(local-generated-sources-dir)/annotation_processor_output
-
 # build caliper target api jar
 # ============================================================
 # This contains just those classes needed for benchmarks to compile.
@@ -94,9 +86,8 @@
   mockito-host
 
 # Use Dagger2 annotation processor
-PROCESSOR_LIBRARIES := $(DAGGER2_PROCESSOR_LIBRARIES)
-PROCESSOR_CLASSES := $(DAGGER2_PROCESSOR_CLASSES)
-include external/dagger2/java_annotation_processors.mk
+LOCAL_ANNOTATION_PROCESSORS := dagger2-compiler-host
+LOCAL_ANNOTATION_PROCESSOR_CLASSES := dagger.internal.codegen.ComponentProcessor
 
 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
 include $(BUILD_HOST_JAVA_LIBRARY)