Skip to content

Commit

Permalink
Replace framework-annotation-proc java lib with framework-all
Browse files Browse the repository at this point in the history
The purpose of the java lib framework-annotation-proc is to run some
annotation processesors on source files in framework-all-sources.
However, running an annotation processor requires the compilation
of the entire source files; in fact, the output of the annotation
processors are created as byproduct of the compilation. This is a
duplicated compliation because we already are compiling the source files
for the framework-all java lib. To reduce the duplication, replacing
the references to framework-annotation-proc with framework-all, and
removing framework-annotation-proc.

Test: m
Merged-In: I449488cba235211374e2825df97aae84395e60b6
(cherry picked from commit 0b5eb9a)
Change-Id: I449488cba235211374e2825df97aae84395e60b6
  • Loading branch information
jiyongp committed Nov 13, 2019
1 parent b485238 commit 1c70cd0
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,6 @@ java_library {
srcs: [":framework-all-sources"],
installable: false,
libs: ["app-compat-annotations"],
}

java_library {
name: "framework-annotation-proc",
defaults: ["framework-defaults"],
srcs: [":framework-all-sources"],
libs: ["app-compat-annotations"],
installable: false,
plugins: [
"unsupportedappusage-annotation-processor",
"compat-changeid-annotation-processor",
Expand All @@ -472,7 +464,7 @@ java_library {

platform_compat_config {
name: "framework-platform-compat-config",
src: ":framework-annotation-proc",
src: ":framework-all",
}

// A library including just UnsupportedAppUsage.java classes.
Expand Down Expand Up @@ -1564,7 +1556,7 @@ aidl_mapping {

genrule {
name: "framework-annotation-proc-index",
srcs: [":framework-annotation-proc"],
srcs: [":framework-all"],
cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
out: ["unsupportedappusage_index.csv"],
dist: {
Expand Down

0 comments on commit 1c70cd0

Please sign in to comment.