From a1f8e1ab3d9f6e2f7db4602d63bf491173642c6c Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 21 Jan 2019 21:45:20 -0800 Subject: [PATCH] Replace annotation_processors with plugins The annotation_processors property is deprecated, replace it with plugins, and use java_plugin for modules that provide annotation processors. Bug: 77284273 Test: m checkbuild Change-Id: I14ed4d81e097510866cbb9a27c72be4426117885 --- Android.bp | 6 +----- tools/processors/unsupportedappusage/Android.bp | 4 +++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Android.bp b/Android.bp index 81a98502d519c..0c8847185ec2a 100644 --- a/Android.bp +++ b/Android.bp @@ -741,11 +741,7 @@ java_library { name: "framework-annotation-proc", defaults: ["framework-defaults"], // Use UsedByApps annotation processor - annotation_processors: ["unsupportedappusage-annotation-processor"], - // b/25860419: annotation processors must be explicitly specified for grok - annotation_processor_classes: [ - "android.processor.unsupportedappusage.UsedByAppsProcessor", - ], + plugins: ["unsupportedappusage-annotation-processor"], } // A host library including just UnsupportedAppUsage.java so that the annotation diff --git a/tools/processors/unsupportedappusage/Android.bp b/tools/processors/unsupportedappusage/Android.bp index 1aca3edfab888..0e33fddcde075 100644 --- a/tools/processors/unsupportedappusage/Android.bp +++ b/tools/processors/unsupportedappusage/Android.bp @@ -1,6 +1,8 @@ -java_library_host { +java_plugin { name: "unsupportedappusage-annotation-processor", + processor_class: "android.processor.unsupportedappusage.UnsupportedAppUsageProcessor", + java_resources: [ "META-INF/**/*", ],