Revert "Reland "Android: Make building junit_binary() targets faster""

This reverts commit 849efa27a16b41fe58bea04a71552ea131e289af.

Reason for revert: Android bots are consistently failing, e.g:
https://ci.chromium.org/ui/p/chromium/builders/try/android-marshmallow-arm64-rel/1208490/overview

Original change's description:
> Reland "Android: Make building junit_binary() targets faster"
>
> This reverts commit e08710f6d3b85629e0791544c02128aec0bc00bc.
>
> Reason for revert: Fixed __errorprone targets being left out
>
> Original change's description:
> > Revert "Android: Make building junit_binary() targets faster"
> >
> > This reverts commit 09f945a36373ed66b95a398f08a776de03d5676c.
> >
> > Reason for revert: Likely breaking bots on CI and CQ.
> >
> > Original change's description:
> > > Android: Make building junit_binary() targets faster
> > >
> > > by skipping dex generation.
> > >
> > > Changes to java_library_impl subtargets:
> > > * Renames __impl to __host, and removes __dex dep from it
> > > * Adds __validate subtargets for static analysis
> > >
> > > In order to minimize the number of subtargets:
> > > * The ijar/turbine targets now double as the __header subtarget
> > >   when present.
> > > * The classpath validation target doubles as the __validate subtarget
> > >   when present.
> > > * The fake_rjava_target target doubles as the __assetres subtarget
> > >   when present
> > >
> > > To make robolectric_library and junit_binary targets avoid building
> > > dex, they now depend on __host targets of deps rather than the
> > > top-level targets of deps. In order to not break analysis steps, they
> > > also depend on the __validate subtargets.
> > >
> > > I originally tried creating targets for __device, __dex, __javac. This
> > > allowed apk and bytecode checker targets to skip building __host .jar
> > > files, for apk steps to not have to wait for static analysis steps,
> > > and for proguarded targets to not dex library targets. However, it
> > > came with the cost of 3 more group targets per java target, which
> > > slows down GN & Ninja, and the build speed-up was minor. It may still
> > > be worth attempting this in the future, but this CL is a big enough
> > > change on its own, and provides the biggest benefit.
> > >
> > > Doing a clean build of content_junit_tests without static analysis:
> > > Before:
> > >     20.8 s weighted time to generate 140 .javac.jar files (719.2 s elapsed time sum)
> > >     94.7 s weighted time to generate 298 .dex.jar files (1801.7 s elapsed time sum)
> > >     140.2 s weighted time (3686.0 s elapsed time sum, 26.3x parallelism)
> > >
> > > After:
> > >     23.1 s weighted time to generate 140 .javac.jar files (492.5 s elapsed time sum)
> > >     45.5 s weighted time (1239.2 s elapsed time sum, 27.2x parallelism)
> > >
> > > A run average of "gn gen" actually gets a bit faster with this change:
> > > Before:
> > >     Made 40518 targets from 3240 files in 8733ms
> > >
> > > After:
> > >     Made 40572 targets from 3240 files in 8181ms
> > >
> > > Bug: 1334449
> > > Change-Id: Ia03d28756abc3f52485c2c080930ecbdd3e52137
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3723297
> > > Reviewed-by: Peter Wen <wnwen@chromium.org>
> > > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#1018841}
> >
> > Bug: 1334449
> > Change-Id: I6d2436f1d22698916b8a9c7a06286408b7e220eb
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3733978
> > Commit-Queue: Lei Zhang <thestig@chromium.org>
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Owners-Override: Lei Zhang <thestig@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1018986}
>
> Bug: 1334449
> Change-Id: I06770010d70f7dfb9b004683d1493b15b625c7da
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3735523
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Auto-Submit: Andrew Grieve <agrieve@chromium.org>
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1019224}

Bug: 1334449
Change-Id: Ia22cde478b9e8d00007212402750692fee03063b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3737802
Owners-Override: Sergey Poromov <poromov@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Sergey Poromov <poromov@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1019526}
NOKEYCHECK=True
GitOrigin-RevId: 1ba38f1c6f84c47daf2debb06073ed110502bb5d
2 files changed