Refactor Java build rules to greatly reduce overbuild

This makes use of ninja's "restat" feature to eliminate rebuilding of
dependent java libraries when a library's interface jar is unchanged.

We previously approximated this behavior by having scripts use
to early-return when input md5s didn't change.

Bug: 810890
Change-Id: I08456c172f52e581c84b6a0daf9376e38d7b3df3
Commit-Queue: agrieve <>
Reviewed-by: Eric Stevenson <>
Cr-Commit-Position: refs/heads/master@{#564877}
GitOrigin-RevId: 1d29c5f58575e804a8657f33ccbf9f450b39251c
2 files changed