summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jiyong Park <jiyong@google.com> 2020-02-01 17:16:58 +0900
committer Jiyong Park <jiyong@google.com> 2020-02-01 18:07:57 +0900
commit963ee178c993b77fe75ac4d104b4fa16c7bcdc08 (patch)
treea316bf3b01474b4c54300a622f84b34e172c905f
parent7ba51f4f9e9702c2237051efe9dab50c9f05fb90 (diff)
Don't build framework-annotation-proc with framework.jar
Previously, framework-annotation-proc was built with framework.jar in its classpath. This was because sdk_version is not set for the module, in which case the build system automatically add framework.jar to the classpath. This is wrong because the classes from framework.jar are also provided via the srcs property of framework-annotation-proc. With this setup, a build error could happen when there is a jarjar'ed class. The class is jarjar'ed in framework.jar, while the same class in source files isn't jarjar'ed yet when compiling it. To fix the problem, remove framework.jar out of classpath by setting sdk_version to core_platform and provide additional libraries via libs property. Bug: N/A Test: m Change-Id: I00974c76aaa0ce40384ffa6bf13d4f0ba5e37954
-rw-r--r--Android.bp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index 2318f7bbf73a..c89917975e8e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -551,17 +551,25 @@ java_library {
java_library {
name: "framework-annotation-proc",
- srcs: [":framework-all-sources"],
+ srcs: [
+ ":framework-all-sources",
+ "core/java/**/*.logtags",
+ ],
+ sdk_version: "core_platform",
libs: [
"app-compat-annotations",
+ "ext",
+ "icing-java-proto-lite",
"unsupportedappusage",
],
+
installable: false,
plugins: [
"unsupportedappusage-annotation-processor",
"compat-changeid-annotation-processor",
],
static_libs: [
+ "framework-internal-utils",
"exoplayer2-extractor",
"android.hardware.wifi-V1.0-java-constants",
]