[Errorprone] Introduce a new way to find src/ for UseNetworkAnnotations

Currently, it is assumed that the build path is always inside top-level
`src/` to check UseNetworkAnnotations. It usually works well, but if the
build path is outside of `src/`, it may cause an build errors. So this
patch introduces a new way to find the top-level `src/` directory so
that it can be found regardless of the build path.

Bug: 1231780
Change-Id: Ic499f9aa33bb846e36a204efed052b361986fba9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3691297
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Jinho Bang <zino@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1012810}
NOKEYCHECK=True
GitOrigin-RevId: 7eee059823a650b1cec83d117fb0901c93b89f41
1 file changed
tree: 604dbfa986b373e7ebdcd5ba6dfdd5951408ddb4
  1. src/
  2. test/
  3. BUILD.gn
  4. OWNERS