Android: Prefer direct interface classpaths
Previously we passed in the transitive interface classpath to each java
target for compiles. This means that if A depends on B which depends on
C, any changes to C will require that both A and B are re-compiled, even
if B does not change after compilation, since A directly depended on
both B and C.
After switching to direct interface classpaths, a change in C no longer
automatically means that A needs to be recompiled, thus speeding up the
build and reducing the number of edges in our build graph. This is a
step towards being explicit about what each target actually depends on.
Since each directory needs to have its BUILD.gn files updated to
include missing direct deps (for annotations, imports, parameters,
transitive classes), a temporary allowlist has been added to make the
transition easier. Follow-up CLs will remove each entry from the
allowlist after updating all the BUILD.gn files in that directory.
Transitive classes generated by turbine in the META-INF/TRANSITIVE dir
are also added to the classpath. This removes the necessity of adding a
direct dependency on an indirectly used class (e.g. method on parent of
Commit-Queue: Peter Wen <firstname.lastname@example.org>
Auto-Submit: Peter Wen <email@example.com>
Reviewed-by: Andrew Grieve <firstname.lastname@example.org>
3 files changed