Граф коммитов

916 Коммитов

Автор SHA1 Сообщение Дата
Peter Kotwicz 57299669d3 [Android] Make build style more strict about resource overriding
This CL:
Adds to android_apk_or_module() template:
- enforce_resource_overlays parameter to indicate that strict resource
  override checking is desired. The purpose is to enable landing this CL
  without breaking downstream.
Adds to android_resources():
- resource_overlay parameter to indicate that the target overrides
another target's resources

BUG=1093825

Change-Id: I4229b343654f873c22c3e58bbbfd01209d9c880c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367352
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: benjamin joyce <bjoyce@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803775}
GitOrigin-RevId: 629170f53008773b0808a62ae797fbc1c3d07b1d
2020-09-01 22:56:07 -07:00
Yngve N. Pettersen a99f0cc429 Specify GN not_needed() for lint deps
When defining lint_suppressions_dep it might not be used when
generating some variants of the project for Android.

Change-Id: I056865bd030201448c870f259e0b0027c9c71eee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2385361
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803573}
GitOrigin-RevId: 1a75ed030df55be4cafd526a29425c3af60d7ed4
2020-09-01 11:42:48 -07:00
Andrew Grieve c10077be58 Make Cronet use GN arg for min_sdk_version and bump android32_ndk_api_level
Java code can have per-target lower-than-default min_sdk_versions, but
the same is not true for native code. In order to increase
min_sdk_version for native code, it must be done globally.

Bug: 1116198, 1119402
Change-Id: Id6e55027f57bae26fc13b4338c4b16c462dfacf5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367649
Reviewed-by: Zhongyi Shi <zhongyi@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803202}
GitOrigin-RevId: 384463e4b49150229134f4a5a7a5589e2437f53b
2020-08-31 11:53:45 -07:00
Justin DeWitt ec6ba21768 [AAR] Re-enable info file asserts.
These were temporarily disabled to allow a multi-sided merge.

Tbr: bialpio@chromium.org
Bug: 1113301
Change-Id: I1d9ef778868e89547ef42117cfb804304558890f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2376028
Reviewed-by: Piotr Bialecki <bialpio@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802501}
GitOrigin-RevId: 615444a51cb6fc9cc23305da43f5b93bde733a4c
2020-08-27 20:22:56 -07:00
Sam Maier 36b4ea857f Removing extract_assets from android_aar_prebuilt
This is unused, and now that we have an expectations file this should still
be easy enough to audit.

Change-Id: Ic48e76ed4e1b90e351c27a350cf82d3f6b0fea6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380576
Auto-Submit: Sam Maier <smaier@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802443}
GitOrigin-RevId: 911c0aaf96e5ee85bcd921f6170b1ac71998c483
2020-08-27 17:03:30 -07:00
Andrew Grieve e9cae1ecfd Reland #2: Add -noverify to build commands to improve runtime (local builds only)
This reverts commit f05ab16d76cbf8d7372a3a4a1a94c80c3f1c97bc.

Reason for reland: Repro'ed locally. Increased -Xmx flag.

> > > Original change's description:
> > > > Add -noverify to build commands to improve runtime (local builds only)
> > > >
> > > > The flag is guarded by treat_warnings_as_errors=false so that it
> > > > will apply only to local developer builds.
> > > >
> > > > Results from //tools/android/build_speed/benchmark.py base_java_sig:
> > > > With change:
> > > > base_java_sig: 68.0s avg (68.8s, 67.2s)
> > > > base_java_sig: 68.4s avg (68.6s, 68.2s)
> > > >
> > > > Without change:
> > > > base_java_sig: 69.4s avg (69.3s, 69.5s)
> > > > base_java_sig: 69.7s avg (69.7s, 69.7s)
> > > >
> > > > time out/Debug/bin/run_base_junit_tests:
> > > > With Change:
> > > > real 0m22.741s
> > > > real 0m23.543s
> > > >
> > > > Without change:
> > > > real 0m23.176s
> > > > real 0m24.328s
> > > >
> > > > Bug: 1117222
> > > > Change-Id: I4bfd742165468bf9538e6fa0dc8f35daa9e0f23f
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2313299
> > > > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > > > Auto-Submit: Andrew Grieve <agrieve@chromium.org>
> > > > Reviewed-by: Peter Wen <wnwen@chromium.org>
> > > > Cr-Commit-Position: refs/heads/master@{#799285}
> > >
> > > TBR=wnwen@chromium.org,agrieve@chromium.org
> > >
> > > Change-Id: I82f411e5dab89c361a30c33e9103bd8561f19765
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: 1117222
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362493
> > > Reviewed-by: Hajime Hoshi <hajimehoshi@chromium.org>
> > > Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#799471}
> >
> > Bug: 1117222
> > Change-Id: Ib43bfe72869def7da43b237360df0e155149a963
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363975
> > Reviewed-by: Peter Wen <wnwen@chromium.org>
> > Commit-Queue: Peter Wen <wnwen@chromium.org>
> > Auto-Submit: Andrew Grieve <agrieve@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#800233}
>
> TBR=wnwen@chromium.org,agrieve@chromium.org
>
> Change-Id: I0d617bcfc7a311bfae743445fccaaab26364511e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1117222
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368541
> Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
> Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#800435}

Bug: 1117222
Change-Id: I48b3b0349490241cca1d7d7aa33004ed55bf887f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368928
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800657}
GitOrigin-RevId: 521a6f65acea73aa9e19d2c818432250230f2cc9
2020-08-21 11:38:05 -07:00
Wei-Yin Chen (陳威尹) 47bdf0e769 Revert "Reland "Add -noverify to build commands to improve runtime (local builds only)""
This reverts commit a1325695b587ce991a6c4779c9bb4572679bb6a6.

Reason for revert: Android ASAN bot compilation failure. crbug.com/1120202

Original change's description:
> Reland "Add -noverify to build commands to improve runtime (local builds only)"
>
> This reverts commit 17e2a91739763a890f8e80db5689f3bb0b49723a.
>
> Reason for revert: Ensure buildtools.py is a no-op on bots.
>
> Original change's description:
> > Revert "Add -noverify to build commands to improve runtime (local builds only)"
> >
> > This reverts commit 132e1debe3ff6fe2732b8b612534d7c207651777.
> >
> > Reason for revert: Android ASAN bot compilation failures: https://ci.chromium.org/p/chromium/builders/ci/Android%20ASAN%20%28dbg%29/26489
> >
> > Original change's description:
> > > Add -noverify to build commands to improve runtime (local builds only)
> > >
> > > The flag is guarded by treat_warnings_as_errors=false so that it
> > > will apply only to local developer builds.
> > >
> > > Results from //tools/android/build_speed/benchmark.py base_java_sig:
> > > With change:
> > > base_java_sig: 68.0s avg (68.8s, 67.2s)
> > > base_java_sig: 68.4s avg (68.6s, 68.2s)
> > >
> > > Without change:
> > > base_java_sig: 69.4s avg (69.3s, 69.5s)
> > > base_java_sig: 69.7s avg (69.7s, 69.7s)
> > >
> > > time out/Debug/bin/run_base_junit_tests:
> > > With Change:
> > > real 0m22.741s
> > > real 0m23.543s
> > >
> > > Without change:
> > > real 0m23.176s
> > > real 0m24.328s
> > >
> > > Bug: 1117222
> > > Change-Id: I4bfd742165468bf9538e6fa0dc8f35daa9e0f23f
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2313299
> > > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > > Auto-Submit: Andrew Grieve <agrieve@chromium.org>
> > > Reviewed-by: Peter Wen <wnwen@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#799285}
> >
> > TBR=wnwen@chromium.org,agrieve@chromium.org
> >
> > Change-Id: I82f411e5dab89c361a30c33e9103bd8561f19765
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 1117222
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362493
> > Reviewed-by: Hajime Hoshi <hajimehoshi@chromium.org>
> > Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#799471}
>
> Bug: 1117222
> Change-Id: Ib43bfe72869def7da43b237360df0e155149a963
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363975
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Auto-Submit: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#800233}

TBR=wnwen@chromium.org,agrieve@chromium.org

Change-Id: I0d617bcfc7a311bfae743445fccaaab26364511e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1117222
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368541
Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800435}
GitOrigin-RevId: f05ab16d76cbf8d7372a3a4a1a94c80c3f1c97bc
2020-08-20 20:13:52 -07:00
Andrew Grieve ebba5b5083 Reland "Add -noverify to build commands to improve runtime (local builds only)"
This reverts commit 17e2a91739763a890f8e80db5689f3bb0b49723a.

Reason for revert: Ensure buildtools.py is a no-op on bots.

Original change's description:
> Revert "Add -noverify to build commands to improve runtime (local builds only)"
>
> This reverts commit 132e1debe3ff6fe2732b8b612534d7c207651777.
>
> Reason for revert: Android ASAN bot compilation failures: https://ci.chromium.org/p/chromium/builders/ci/Android%20ASAN%20%28dbg%29/26489
>
> Original change's description:
> > Add -noverify to build commands to improve runtime (local builds only)
> >
> > The flag is guarded by treat_warnings_as_errors=false so that it
> > will apply only to local developer builds.
> >
> > Results from //tools/android/build_speed/benchmark.py base_java_sig:
> > With change:
> > base_java_sig: 68.0s avg (68.8s, 67.2s)
> > base_java_sig: 68.4s avg (68.6s, 68.2s)
> >
> > Without change:
> > base_java_sig: 69.4s avg (69.3s, 69.5s)
> > base_java_sig: 69.7s avg (69.7s, 69.7s)
> >
> > time out/Debug/bin/run_base_junit_tests:
> > With Change:
> > real 0m22.741s
> > real 0m23.543s
> >
> > Without change:
> > real 0m23.176s
> > real 0m24.328s
> >
> > Bug: 1117222
> > Change-Id: I4bfd742165468bf9538e6fa0dc8f35daa9e0f23f
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2313299
> > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > Auto-Submit: Andrew Grieve <agrieve@chromium.org>
> > Reviewed-by: Peter Wen <wnwen@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#799285}
>
> TBR=wnwen@chromium.org,agrieve@chromium.org
>
> Change-Id: I82f411e5dab89c361a30c33e9103bd8561f19765
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1117222
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362493
> Reviewed-by: Hajime Hoshi <hajimehoshi@chromium.org>
> Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#799471}

Bug: 1117222
Change-Id: Ib43bfe72869def7da43b237360df0e155149a963
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363975
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800233}
GitOrigin-RevId: a1325695b587ce991a6c4779c9bb4572679bb6a6
2020-08-20 11:27:09 -07:00
Mohamed Heikal 288f9bf6b4 Make doubledown rolled packages private
We should ensure that no new usages of the real targets can be added.

Change-Id: I4999c2257f9aedef38809c4f182f419c8bed058c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2357452
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799813}
GitOrigin-RevId: b7098f557444b7780f9e0fa84b9b84c2475153c3
2020-08-19 15:43:11 -07:00
Hajime Hoshi 8233935da4 Revert "Add -noverify to build commands to improve runtime (local builds only)"
This reverts commit 132e1debe3ff6fe2732b8b612534d7c207651777.

Reason for revert: Android ASAN bot compilation failures: https://ci.chromium.org/p/chromium/builders/ci/Android%20ASAN%20%28dbg%29/26489

Original change's description:
> Add -noverify to build commands to improve runtime (local builds only)
>
> The flag is guarded by treat_warnings_as_errors=false so that it
> will apply only to local developer builds.
>
> Results from //tools/android/build_speed/benchmark.py base_java_sig:
> With change:
> base_java_sig: 68.0s avg (68.8s, 67.2s)
> base_java_sig: 68.4s avg (68.6s, 68.2s)
>
> Without change:
> base_java_sig: 69.4s avg (69.3s, 69.5s)
> base_java_sig: 69.7s avg (69.7s, 69.7s)
>
> time out/Debug/bin/run_base_junit_tests:
> With Change:
> real 0m22.741s
> real 0m23.543s
>
> Without change:
> real 0m23.176s
> real 0m24.328s
>
> Bug: 1117222
> Change-Id: I4bfd742165468bf9538e6fa0dc8f35daa9e0f23f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2313299
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Auto-Submit: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#799285}

TBR=wnwen@chromium.org,agrieve@chromium.org

Change-Id: I82f411e5dab89c361a30c33e9103bd8561f19765
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1117222
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362493
Reviewed-by: Hajime Hoshi <hajimehoshi@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799471}
GitOrigin-RevId: 17e2a91739763a890f8e80db5689f3bb0b49723a
2020-08-18 20:38:08 -07:00
Andrew Grieve be5866c934 Add -noverify to build commands to improve runtime (local builds only)
The flag is guarded by treat_warnings_as_errors=false so that it
will apply only to local developer builds.

Results from //tools/android/build_speed/benchmark.py base_java_sig:
With change:
base_java_sig: 68.0s avg (68.8s, 67.2s)
base_java_sig: 68.4s avg (68.6s, 68.2s)

Without change:
base_java_sig: 69.4s avg (69.3s, 69.5s)
base_java_sig: 69.7s avg (69.7s, 69.7s)

time out/Debug/bin/run_base_junit_tests:
With Change:
real 0m22.741s
real 0m23.543s

Without change:
real 0m23.176s
real 0m24.328s

Bug: 1117222
Change-Id: I4bfd742165468bf9538e6fa0dc8f35daa9e0f23f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2313299
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799285}
GitOrigin-RevId: 132e1debe3ff6fe2732b8b612534d7c207651777
2020-08-18 13:21:20 -07:00
Clark DuVall 8df36163b4 [WebLayer] Support building WebLayer as an isolated split in WebView
This adds basic support for building WebLayer as an isolated split in
WebView. A new gn arg "weblayer_in_split" is added which will move
WebLayer Java code to it's own DFM if true.

Supporting isolated splits required some client changes in WebLayer, so
I added a check in WebLayerFactoryImpl.isClientSupported() to make sure
isolated splits aren't used with an unsupported client.

This also adds the ability to write the version_name and version_code of
a bundle module to the build_config, which allows DFMs to match the base
module version info (an error is thrown if these don't match). This
makes it easy to share version info, since computing WebView
version_code is pretty complicated.

The bundle with isolated splits won't install correctly with the current
version of bundletool we have in Chromium, but I'm working in parallel
on fixing bundletool.

Bug: 1105096
Change-Id: Id5522b42e283dc813fa84aaedc806f7519b586ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353378
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798815}
GitOrigin-RevId: c5f986b96cff358525864463b5fce0c195f6b9a2
2020-08-17 13:50:42 -07:00
Peter Wen 84cf622773 Android: Use per-target lint-suppressions.xml
Previously all lint targets shared one lint suppressions/config file:
//build/android/lint/suppressions.xml

This resulted in many unnecessary suppressions being added which then
suppress the lint checks for every lint target. e.g. if monochrome fails
ObsoleteSdkInt checks, suppressing it globally turns off the checks for
all other apks, which decreases the utility of android lint for all
those other apks.

This CL removes the shared suppressions.xml file and splits its content
between the targets that actually need them, and adds lint-baseline.xml
files where necessary. This also removes the bottleneck of requiring a
//build/android/OWNERS to stamp every lint suppression change.

This CL also adds suppressions for targets depending on code that chrome
already lints via monochrome. E.g. errors in //base are shared by all
embedders' lint targets, and it should not become the burden of targets
like cast shell or cronet to fix. Thus these errors are suppressed in
cronet/cast/remoting-specific suppressions.xml files.

This CL changes lint to run in the output directory so that baseline
suppressions work for generated files (e.g. AndroidManifest.xml).

Bug: 1113795,1115594
Fixes: 1115594
Change-Id: I2d70128707c0fa862c109b6f91631a07916c90d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346857
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Yuchen Liu <yucliu@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798776}
GitOrigin-RevId: f74622e693e698c40edd15ca0bc7b75b080f5509
2020-08-17 12:44:44 -07:00
Mohamed Heikal 38699a1b28 Allow android_aar_prebuilt info files to be ignored during update
If the update_android_aar_prebuilts gn arg is set, all info files are
updated. However, some info files could actually not be part of the repo
but instead be pulled in via cipd along with the aar itself. This cl
adds a gn template flag to disable updating info files for
android_aar_prebuilt targets that specify it.

Change-Id: I5b82b8e614ab989936834a1b270c0d97bba2da3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353355
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797847}
GitOrigin-RevId: 92baa450571abe2c5c8dba1d1c91ba1df23fb027
2020-08-13 13:59:56 -07:00
Brandon Mousseau a2e1253503 Add asset merging support to android_aar_prebuilt
This change extends android_aar_prebuilt to support including any assets
in the aar file in the output. Currently, if the source aar file
contains any files in the assets subdirectory, the target must define
the ignore_assets flag. This change now optionally allows the user to
instead supply the extract_assets flag so that the assets will be copied
to the output instead.

If assets are included in the source aar, then either ignore_assets or
extract_assets, but not both, must be set.

Assets will be copied to the output target with the same directory
structure as the input aar file.

Bug: 643966
Change-Id: Ibf66543fd9e9dc8db7221234b82c1d860f7f2724
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2350340
Auto-Submit: Brandon Mousseau <bmoose@google.com>
Commit-Queue: Brandon Mousseau <bmoose@google.com>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797544}
GitOrigin-RevId: 3f954b32ae3328f1521a9e944a9a419fe308558a
2020-08-12 19:35:34 -07:00
Mohamed Heikal f3d6345012 Use variables to refer to proto runtime and compiler
Internal checkouts can use a different protocol buffers and runtime,
thus use variables to refer to them so they could be changed based on
your checkout.

TBR=# noop change to proto runtime target name

Bug: 1114836
Change-Id: I564b5f7bfa65ff549c335766c26b2d1dd07241fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346861
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797375}
GitOrigin-RevId: 15f141f41f26207b5bd3379118e3a8d1d777771c
2020-08-12 12:38:29 -07:00
Mohamed Heikal abf3d46936 Fix bug where chrome's app icon is missing in AGSA
AGSA queries an apps icon by name and thus fails on collapsed names. The
fix is to not collapse mipmaps (application icons).

This also fixes an old layering bug where chrome only resources were
listed under android_webview by allowing multiple config files for use
by Monochrome and Trichrome. Additionally the directive no_obfuscate has
been deprecated with no_collapse as its replacement.

TBR=boliu@chromium.org # noop change to webview config file.

Bug: b/161564466
Change-Id: Idb735cd07e9e95ab572297c8dc4848451d8d52bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343755
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796449}
GitOrigin-RevId: ffd91e520d00750a8729d1aa2c48e879fb454c98
2020-08-10 11:00:21 -07:00
Peter Wen 58f46cb78c Android: Remove unnecessary manifest_package
Lint no longer requires manifest_package to be specified, so remove this
arg from lint.py as well as the gn templates.

Bug: 1108791
Change-Id: I4b48dc1ce3eb40ef8b4e703ca4ece475f2d28c4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339929
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796425}
GitOrigin-RevId: b4bf03c54733a8fe0a4a42fa2efa9f03215c803b
2020-08-10 10:06:59 -07:00
Peter Wen 3294f9aeb5 Android: Allow targets to specify baseline.xml
Rather than use one universal baseline.xml for lint, allow each target
that wants to use lint baselines to specify its own via the gn variable
lint_baseline. This also allows better co-location of baseline.xml and
the code that it refers to.

Also fixes the existing lint issues for cast apk.

Bug: 1108791
Change-Id: I982cd35636ce9e08817be6cf8b6cccd18455d8ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2327834
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: John Rummell <jrummell@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796418}
GitOrigin-RevId: 45a32111683bb3ea12ce3b21752a9719d85607f6
2020-08-10 09:52:51 -07:00
Justin DeWitt 2943e821f6 Exclude empty AndroidManifest.xml from resources in an AAR prebuilt.
Previously, the android manifest would be included always, this can
result in issues extra permissions being requested if minSdkVersion
is not set.

Bug: 1113301
Change-Id: I716fdf151a0ef56fbddfea990db2f0fe9b131f20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2340066
Reviewed-by: Haiyang Pan <hypan@google.com>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Justin DeWitt <dewittj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795719}
GitOrigin-RevId: 9eaee75f93dbe258773e55a5c5d06aa0fecb9682
2020-08-06 17:11:29 -07:00
Peter Wen ffbb933b99 Android: Use a unified lint target
Lint is no longer implicitly run as part of an apk or bundle target. If
a specific apk or bundle wants to turn on its own lint and have that run
automatically on every build, the enable_lint flag can be used. See:
"boundary_interface_example_apk".

A new target //chrome/android:android_lint (or simply "android_lint")
has been added. This currently runs either monochrome_public_bundle's
lint task or a list of default targets if such a list is defined.

For chrome apk/bundle targets based on chrome_public_apk_tmpl.gni, they
will automatically get a data_dep added on the new unified lint target
so most devs' workflow will not need to change.

APKs in for {remoting,cronet,cast} have enable_lint added explicitly in
this CL to preserve their existing behaviour.

NewApi and VisibleForTests checks have been disabled for test apks, with
a TODO for turning at least NewApi back on.

Bug: 1108791
Fixed: 1108791
Change-Id: I6534fcd6dc7af1d7a12720a98f8d0d09bee8f161
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2318549
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792728}
GitOrigin-RevId: f40e2d02801df0a75a88a63e76ede485739e2d22
2020-07-29 09:25:06 -07:00
Peter Wen d0035487ea Android: Add lint_min_sdk_version override
Allow linting with a minSdkVersion that is different that the current
APK/Bundle's min_sdk_version. This paves the way for using a single
unified target for most lint runs.

e.g. monochrome_public_bundle can set lint_min_sdk_version to 21 so that
it lints against a lower minSdkVersion than its min_sdk_version (24).

Bug: 1108791
Change-Id: I703d1ef19f7fc9182f52bc6ef0ae8535c024b10f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316334
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791925}
GitOrigin-RevId: 623263d6782306905fb384d1688b6d8798784c39
2020-07-27 12:18:42 -07:00
Andrew Grieve 7982d7475f Add support for proguard and asset/lib expectation diffs
* Refactors more common logic for the three expectation file types
  into diff_utils.py
* Changes sort order for proguard expectations so that they diff better
* Output "actual_data" rather than .stamp files for expectation targets
* Stop writing out .proguard_configs for all proguard runs
  * I don't think these files have been referenced for a long time, and
    the expectations file largely serves their purpose in a more
    discoverable way.
* Don't define validate_expectations GN group unless it will
  have deps (to prevent thinking your GN args are correct when
  they are not).

Bug: 1064151
Change-Id: I5394471e7defd2c2f7e2f2173097a11d830cde65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2314265
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791342}
GitOrigin-RevId: 5b72f4a35e83cd3ad7358128d79b6ac3245bf138
2020-07-24 21:42:27 -07:00
Peter Wen 2011c7b3dd Android: Use direct deps for cronet and modules (reland)
Remove allowlist for bypassing turbine direct deps since the last items
in the allowlist (cronet and modules) have been removed.

Bundle feature modules require the base module in their classpath.
Previously they were able to get by since the base module was added to
their transitive classpath, but the base module should be in their
direct classpath as it is used directly in R.java via inheritance.

Fix in reland:
- Add missing dep on base module java

Tbr: agrieve@chromium.org for reland
Fixed: 1082904
Bug: 1082904
Change-Id: I4b2d6a173ad207efcc9730589b1322a02071a2c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2314938
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791258}
GitOrigin-RevId: 85f7ce53467938a068a0a670db400eec1090a739
2020-07-24 21:42:06 -07:00
Andrew Grieve 04d72f3a8e Revert "Android: Use direct deps for cronet and modules"
This reverts commit 660b593306570c04200321f99aaac34831c3d490.

Reason for revert: Broke android-archive-rel
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8874020961794812528/+/steps/compile/0/stdout

Original change's description:
> Android: Use direct deps for cronet and modules
>
> Remove allowlist for bypassing turbine direct deps since the last items
> in the allowlist (cronet and modules) have been removed.
>
> Bundle feature modules require the base module in their classpath.
> Previously they were able to get by since the base module was added to
> their transitive classpath, but the base module should be in their
> direct classpath as it is used directly in R.java via inheritance.
>
> Fixed: 1082904
> Bug: 1082904
> Change-Id: I75d89815de894c64581b98e35243aca5bc8d4e93
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2314757
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Auto-Submit: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#791117}

TBR=wnwen@chromium.org,agrieve@chromium.org

Change-Id: Iac0700e90845d2e1b85ed860abbff4c6c942df42
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1082904
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315009
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791126}
GitOrigin-RevId: 349aba7e7c58ed797dd134987b8c74f1f6018ce9
2020-07-22 20:11:49 -07:00
Peter Wen 7e2f4d28ef Android: Use direct deps for cronet and modules
Remove allowlist for bypassing turbine direct deps since the last items
in the allowlist (cronet and modules) have been removed.

Bundle feature modules require the base module in their classpath.
Previously they were able to get by since the base module was added to
their transitive classpath, but the base module should be in their
direct classpath as it is used directly in R.java via inheritance.

Fixed: 1082904
Bug: 1082904
Change-Id: I75d89815de894c64581b98e35243aca5bc8d4e93
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2314757
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791117}
GitOrigin-RevId: 660b593306570c04200321f99aaac34831c3d490
2020-07-22 19:02:40 -07:00
Arthur Wang 510ba145bb Add missing data dependency for chrome_java_test_wpr_tests
Add more logging into test runner.

Bug: 1060399
Change-Id: I4bdc9ac8413f8ea04433ae927106f73d94788330
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253083
Commit-Queue: Arthur Wang <wuwang@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791091}
GitOrigin-RevId: 3ab9a142091516aa57f10feebc46dee649ae4589
2020-07-22 18:08:06 -07:00
Mohamed Heikal b54b047a39 Fix build issues with creating R.java in java_library targets (Reland)
A collection of bugfixes for creating R.java in java_library_impl
targets:
- test libraries support.
- apk under test R.java shadowing bugfix.
- always generate onResourcesLoaded like package resources did.
- Fix issue where R.java is not generated for the apk package name.
- Change webAPK manifest package name (remove .new because it is a java
keyword).

Reason for reland: Fixed build issue with webAPKs.
Original CL: https://chromium-review.googlesource.com/c/chromium/src/+/2302919
This reverts commit 1895ffb4f48aa8e0ef0f64291d40d5e0e9037bd1

Bug: 1073476
Change-Id: Ic095091eb64db32d1653e219f507463de59cacf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2307809
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790428}
GitOrigin-RevId: 1e900731f221f60ba590d99741625047c51b844a
2020-07-21 09:40:46 -07:00
Mohamed Heikal dc1d14d5e6 Revert "Fix build issues with creating R.java in java_library targets"
This reverts commit 7a1a3bdcb3bdd19a30ded0752c609e2e8aea1942.

Reason for revert: breaks android-archive-rel https://ci.chromium.org/p/chromium/builders/ci/android-archive-rel/13342

Original change's description:
> Fix build issues with creating R.java in java_library targets
>
> A collection of bugfixes for creating R.java in java_library_impl
> targets:
> - test libraries support.
> - apk under test R.java shadowing bugfix.
> - always generate onResourcesLoaded like package resources did.
> - Fix issue where R.java is not generated for the apk package name.
>
> Bug: 1073476
> Change-Id: I0cebd9626b0ce9049554f8345af516f7bd0ec2aa
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302919
> Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#789690}

TBR=agrieve@chromium.org,mheikal@chromium.org

Change-Id: I0113b626a076a3b01abbe985560c5d9f1470faa9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1073476
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302816
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789699}
GitOrigin-RevId: 1895ffb4f48aa8e0ef0f64291d40d5e0e9037bd1
2020-07-17 17:26:06 -07:00
Mohamed Heikal a9fc325b00 Fix build issues with creating R.java in java_library targets
A collection of bugfixes for creating R.java in java_library_impl
targets:
- test libraries support.
- apk under test R.java shadowing bugfix.
- always generate onResourcesLoaded like package resources did.
- Fix issue where R.java is not generated for the apk package name.

Bug: 1073476
Change-Id: I0cebd9626b0ce9049554f8345af516f7bd0ec2aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302919
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789690}
GitOrigin-RevId: 7a1a3bdcb3bdd19a30ded0752c609e2e8aea1942
2020-07-17 16:17:04 -07:00
Mohamed Heikal ca56084168 Remove unneeded extra_r_text_files from resource management
We migrated into an inheritance based R.java files that means that each
R.java file has access to all resources without manually specifying each
resource individually. This means the extra_r_text_files option is no
longer needed/used since we no longer need to know exactly what is in
each R.java file separately.

Change-Id: I71ebabda0d998a53a0ae54b8a3fd6cd84311105d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302933
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789316}
GitOrigin-RevId: eac6444a79e4ea5e6209e1fe760776812dd23c91
2020-07-16 18:47:25 -07:00
Peter Kotwicz 883c11fd88 [Android] Re-enable custom errorprone plugins
The custom Chromium errorprone plugins were unintentionally disabled
as a result of
https://chromium-review.googlesource.com/c/chromium/src/+/2133870

This CL re-enables the errorprone plugins by using the
auto_service_processor in the javac compile of the
errorprone_plugin java_binary. This preserves the META-INF service
provider configuration generated by auto_service_processor.

This CL:
- Adds the 'processor_generates_service_provider_configuration'
parameter to the java_annotation_processor() template to indicate
whether the annotation processor generates the META-INF service provider
configuration files. If a library depends on an annotation processor
which has the parameter set, the annotation processor will be
passed in the --processorpath and --processor parameters in the javac
compile in addition to the turbine compile.
- Adds the 'errorprone_stderr_path' to the java_library() template to
save the stderr output of the errorprone compile to a file.

BUG=1104558
TEST=errorprone_plugin:tests

Change-Id: If224e9a2cb62b3fae72ffb6664aa54770530672d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2291983
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788647}
GitOrigin-RevId: b8c6444fbfead99b92e5419bf5c81cf7813673c3
2020-07-15 08:48:04 -07:00
Andrew Grieve 2f6eb42ac8 Android: Make android_test_apk() define target with name=target_name
It's really unusual to have a template that does not result in a target
with name=target_name. In this case android_test_apk() was appending
"__apk" for no apparent reason.

Change-Id: I0867622ff27962aebc1c64c12a57c8ab0925d6de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2293216
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#787776}
GitOrigin-RevId: d184159c34056acee5c950c22368bc83b605862d
2020-07-13 10:39:59 -07:00
Andrew Grieve 312532ee66 Reland #3 "Android: Bump default target_sdk_version 24 -> SDK used to compile"
This reverts commit 24bb7e4b349b717ceb773370bbb3430f31e4086c.

Reason for reland: Fixed EmbeddedTestServer by hardcoding its
    target_sdk_version.

Original change's description:
> Revert "Reland #2 "Android: Bump default target_sdk_version 24 -> SDK used to compile""
>
> This reverts commit 0763c88c99e056ff72f3f90043835e836948f601.
>
> Reason for revert: Suspected culprit of crbug.com/1103502

TBR=boliu@chromium.org,agrieve@chromium.org,bsheedy@chromium.org

Bug: 1103295, 1103502
Change-Id: I507a5c643ca501493aa52f719dcb7b31c6a3d670
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2290319
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#787203}
GitOrigin-RevId: 055e50f89c0e6b0865562ae3c20372f491ff40ec
2020-07-10 07:45:39 -07:00
Brian Sheedy 1cbe97a6ba Revert "Reland #2 "Android: Bump default target_sdk_version 24 -> SDK used to compile""
This reverts commit 0763c88c99e056ff72f3f90043835e836948f601.

Reason for revert: Suspected culprit of crbug.com/1103502

Original change's description:
> Reland #2 "Android: Bump default target_sdk_version 24 -> SDK used to compile"
>
> This reverts commit 0763bc9652fcc9ee4017f79e4b55f09e2aed4d66.
>
> Reason for reland: No longer removing target_sdk_version from webapk shell
>
> Original change's description:
> > Revert "Reland "Android: Bump default target_sdk_version 24 -> SDK used to compile""
> >
> > This reverts commit e0f5a1c0395878679d487ebfccc2cf576f69b96c.
> >
> > Reason for revert: Breaking downstream builder:
> > https://logs.chromium.org/logs/chrome/buildbucket/cr-buildbucket.appspot.com/8875332406729172240/+/steps/compile/0/logs/raw_io.output_failure_summary_/0
> >
> > Original change's description:
> > > Reland "Android: Bump default target_sdk_version 24 -> SDK used to compile"
> > >
> > > This reverts commit fb07fcffe0d9785c3d582b1c11900cfd07595dc4.
> > >
> > > Reason for reland: Not changing target_sdk_version for angle tests
> > >
> > > Original change's description:
> > > > Revert "Android: Bump default target_sdk_version 24 -> SDK used to compile"
> > > >
> > > > This reverts commit b7fb15b170d9f2da28908e91cfdaf193eb2170d6.
> > > >
> > > > Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1099849
> > > >
> > > > Original change's description:
> > > > > Android: Bump default target_sdk_version 24 -> SDK used to compile
> > > > >
> > > > > Why do this?
> > > > > * It's best practice to target the latest sdk, so this makes for a
> > > > >   better default.
> > > > > * Many targets were neglecting to ever update this value
> > >
> > > TBR=boliu@chromium.org,torne@chromium.org,agrieve@chromium.org,behdadb@chromium.org
> > >
> > > Bug: 1099849
> > > Change-Id: I95f36a2b88d2e7ad1d90222f25192c9a915550ab
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2280981
> > > Reviewed-by: Bo <boliu@chromium.org>
> > > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#786275}
> >
> > TBR=boliu@chromium.org,agrieve@chromium.org,behdadb@chromium.org
> >
> > Change-Id: If60966b54d37bfa2c5326bcad0f36819f1c47023
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 1099849
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288092
> > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#786357}
>
> TBR=boliu@chromium.org,agrieve@chromium.org,behdadb@chromium.org
>
> Bug: 1103295
> Change-Id: Ia7cdeb9dc309d4bea7e0863b709b29ebc49ee6e0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288097
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#786425}

TBR=boliu@chromium.org,agrieve@chromium.org

Change-Id: Iae61d337d8b0ad8bf1730e9fd66e8629015fb780
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1103295
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2289993
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786888}
GitOrigin-RevId: 24bb7e4b349b717ceb773370bbb3430f31e4086c
2020-07-09 13:15:16 -07:00
Mohamed Heikal 20a5f16315 java_library_impl targets can now generate their own R.java files
To prevent issues where multiple android_resources targets have the same
R.java package, java_library_impl can be configured via
"resources_package" to generate its own R.java (for all transitive
dependencies) rather than using the srcjars provided by its direct
android_resources targets.

Prebuilts no longer create R.java srcjars. Instead, you either need to
depend on the prebuilt from an android_resources target (soon to be
deprecated) or add a resources_package to your android_library target so
it generates a comprehensive R.java for all your target's dependencies.

Bug: 1073476
Change-Id: If06dab74c1d9763a93ffec552caded284d4725a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2281034
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786862}
GitOrigin-RevId: adbe4e48ff767bbd15cacacdb4a4478fac4f8b81
2020-07-09 12:29:55 -07:00
Andrew Grieve 2f694acd10 Reland #2 "Android: Bump default target_sdk_version 24 -> SDK used to compile"
This reverts commit 0763bc9652fcc9ee4017f79e4b55f09e2aed4d66.

Reason for reland: No longer removing target_sdk_version from webapk shell

Original change's description:
> Revert "Reland "Android: Bump default target_sdk_version 24 -> SDK used to compile""
>
> This reverts commit e0f5a1c0395878679d487ebfccc2cf576f69b96c.
>
> Reason for revert: Breaking downstream builder:
> https://logs.chromium.org/logs/chrome/buildbucket/cr-buildbucket.appspot.com/8875332406729172240/+/steps/compile/0/logs/raw_io.output_failure_summary_/0
>
> Original change's description:
> > Reland "Android: Bump default target_sdk_version 24 -> SDK used to compile"
> >
> > This reverts commit fb07fcffe0d9785c3d582b1c11900cfd07595dc4.
> >
> > Reason for reland: Not changing target_sdk_version for angle tests
> >
> > Original change's description:
> > > Revert "Android: Bump default target_sdk_version 24 -> SDK used to compile"
> > >
> > > This reverts commit b7fb15b170d9f2da28908e91cfdaf193eb2170d6.
> > >
> > > Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1099849
> > >
> > > Original change's description:
> > > > Android: Bump default target_sdk_version 24 -> SDK used to compile
> > > >
> > > > Why do this?
> > > > * It's best practice to target the latest sdk, so this makes for a
> > > >   better default.
> > > > * Many targets were neglecting to ever update this value
> >
> > TBR=boliu@chromium.org,torne@chromium.org,agrieve@chromium.org,behdadb@chromium.org
> >
> > Bug: 1099849
> > Change-Id: I95f36a2b88d2e7ad1d90222f25192c9a915550ab
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2280981
> > Reviewed-by: Bo <boliu@chromium.org>
> > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#786275}
>
> TBR=boliu@chromium.org,agrieve@chromium.org,behdadb@chromium.org
>
> Change-Id: If60966b54d37bfa2c5326bcad0f36819f1c47023
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1099849
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288092
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#786357}

TBR=boliu@chromium.org,agrieve@chromium.org,behdadb@chromium.org

Bug: 1103295
Change-Id: Ia7cdeb9dc309d4bea7e0863b709b29ebc49ee6e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288097
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786425}
GitOrigin-RevId: 0763c88c99e056ff72f3f90043835e836948f601
2020-07-08 12:54:42 -07:00
Andrew Grieve 0d79d2f073 Revert "Reland "Android: Bump default target_sdk_version 24 -> SDK used to compile""
This reverts commit e0f5a1c0395878679d487ebfccc2cf576f69b96c.

Reason for revert: Breaking downstream builder:
https://logs.chromium.org/logs/chrome/buildbucket/cr-buildbucket.appspot.com/8875332406729172240/+/steps/compile/0/logs/raw_io.output_failure_summary_/0

Original change's description:
> Reland "Android: Bump default target_sdk_version 24 -> SDK used to compile"
>
> This reverts commit fb07fcffe0d9785c3d582b1c11900cfd07595dc4.
>
> Reason for reland: Not changing target_sdk_version for angle tests
>
> Original change's description:
> > Revert "Android: Bump default target_sdk_version 24 -> SDK used to compile"
> >
> > This reverts commit b7fb15b170d9f2da28908e91cfdaf193eb2170d6.
> >
> > Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1099849
> >
> > Original change's description:
> > > Android: Bump default target_sdk_version 24 -> SDK used to compile
> > >
> > > Why do this?
> > > * It's best practice to target the latest sdk, so this makes for a
> > >   better default.
> > > * Many targets were neglecting to ever update this value
>
> TBR=boliu@chromium.org,torne@chromium.org,agrieve@chromium.org,behdadb@chromium.org
>
> Bug: 1099849
> Change-Id: I95f36a2b88d2e7ad1d90222f25192c9a915550ab
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2280981
> Reviewed-by: Bo <boliu@chromium.org>
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#786275}

TBR=boliu@chromium.org,agrieve@chromium.org,behdadb@chromium.org

Change-Id: If60966b54d37bfa2c5326bcad0f36819f1c47023
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1099849
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288092
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786357}
GitOrigin-RevId: 0763bc9652fcc9ee4017f79e4b55f09e2aed4d66
2020-07-08 10:42:29 -07:00
Andrew Grieve 04210249b2 Reland "Android: Bump default target_sdk_version 24 -> SDK used to compile"
This reverts commit fb07fcffe0d9785c3d582b1c11900cfd07595dc4.

Reason for reland: Not changing target_sdk_version for angle tests

Original change's description:
> Revert "Android: Bump default target_sdk_version 24 -> SDK used to compile"
>
> This reverts commit b7fb15b170d9f2da28908e91cfdaf193eb2170d6.
>
> Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1099849
>
> Original change's description:
> > Android: Bump default target_sdk_version 24 -> SDK used to compile
> >
> > Why do this?
> > * It's best practice to target the latest sdk, so this makes for a
> >   better default.
> > * Many targets were neglecting to ever update this value

TBR=boliu@chromium.org,torne@chromium.org,agrieve@chromium.org,behdadb@chromium.org

Bug: 1099849
Change-Id: I95f36a2b88d2e7ad1d90222f25192c9a915550ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2280981
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786275}
GitOrigin-RevId: e0f5a1c0395878679d487ebfccc2cf576f69b96c
2020-07-08 07:33:48 -07:00
Behdad Bakhshinategh 96d2bd53e1 Revert "Android: Bump default target_sdk_version 24 -> SDK used to compile"
This reverts commit b7fb15b170d9f2da28908e91cfdaf193eb2170d6.

Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1099849

Original change's description:
> Android: Bump default target_sdk_version 24 -> SDK used to compile
>
> Why do this?
> * It's best practice to target the latest sdk, so this makes for a
>   better default.
> * Many targets were neglecting to ever update this value
>
> TBR=agrieve  # Minor BUILD.gn refactoring
>
> Bug: None
> Change-Id: Idb3983bcfb7a1ddaf13900e0acdbee425a450225
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2265513
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Richard Coles <torne@chromium.org>
> Reviewed-by: Bo <boliu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#783112}

TBR=boliu@chromium.org,torne@chromium.org,agrieve@chromium.org

Change-Id: Ia3cf4acb936a6057d8d925335e886bbcf6616026
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2269752
Reviewed-by: Behdad Bakhshinategh <behdadb@chromium.org>
Commit-Queue: Behdad Bakhshinategh <behdadb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#783171}
GitOrigin-RevId: fb07fcffe0d9785c3d582b1c11900cfd07595dc4
2020-06-26 13:48:03 -07:00
Andrew Grieve e5c5e87890 Android: Bump default target_sdk_version 24 -> SDK used to compile
Why do this?
* It's best practice to target the latest sdk, so this makes for a
  better default.
* Many targets were neglecting to ever update this value

TBR=agrieve  # Minor BUILD.gn refactoring

Bug: None
Change-Id: Idb3983bcfb7a1ddaf13900e0acdbee425a450225
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2265513
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#783112}
GitOrigin-RevId: b7fb15b170d9f2da28908e91cfdaf193eb2170d6
2020-06-26 12:20:34 -07:00
Andrew Grieve 8582295164 Finish converting all scripts from depfile -> .pydeps
Removes option to add pydeps via build_utils.WriteDepfile().

TBR=agrieve  # Refactored method signature

Bug: None
Change-Id: I5fb2d4e15c2739344bcb89ebd1906efb10a7c149
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2265504
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782541}
GitOrigin-RevId: 5a01ad3dbc90575c701e4e904333a486365ac3a5
2020-06-25 13:01:03 -07:00
Andrew Grieve ceecd92e25 Android: Build .pak resource whitelist without linking lib(mono)chrome
Allows R8 and lld to run concurrently, saving on build times.

Bug: 1078460
Change-Id: I9ee978800b649634461c49ced4a26ca5015869cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2259292
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782274}
GitOrigin-RevId: 71bd025e860a3fd09bbace45ccf5501d408cda2b
2020-06-25 13:00:06 -07:00
Mohamed Heikal a15c60cc13 Revert "Rollback protobuf lite runtime to 3.0.1"
This reverts commit 8a3e6a2898a3dd20e625cd5013a813982bc6bb63.

Reason for revert: Revert before next branch cut, was only required for a cherry-pick to M84

Original change's description:
> Rollback protobuf lite runtime to 3.0.1
>
> As a temporary fix for android webview regression b/157318961 this cl
> rolls back the protobuf lite runtime to 3.0.1 using the codegen plugin.
>
> Binary-Size: This is temporary and there is not really much we could do.
> Bug: 1093059, b/157318961
> Change-Id: I2bbaf6d3b434221b667901423c4616e26a7550c5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238872
> Reviewed-by: Dan H <harringtond@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
> Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#777495}

TBR=yfriedman@chromium.org,agrieve@chromium.org,mheikal@chromium.org,harringtond@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1093059, b/157318961
Change-Id: Ieda4530327ff3de513601ae3fe0ad5e9c99eeed0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264466
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Dan H <harringtond@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782219}
GitOrigin-RevId: 25f926b7a707a70db7c41a8f1ecf1566a3ffec1b
2020-06-25 12:59:29 -07:00
Andrew Grieve 7d6c5ca6b3 Android: Remove obsolete "verify_manifest" GN variable
Bug: 1095654
Change-Id: Iaf820c43e56f3f8680c34981b9d1bc3cb70b6284
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2257732
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#780845}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 41350a576ee391da8dbecbd0178b0b25a0f7a81f
2020-06-22 17:13:40 +00:00
Andrew Grieve 0cf5db6e98 Add missing forward_variables_from() for expected_android_manifest_base
Bug: 1095654
Change-Id: I55cd6e7c1871fc681480927b9fb90a8466d4791b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2255099
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#780474}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 550aa38f16ed0d5ae5013c501990156a0ce42209
2020-06-19 22:28:37 +00:00
Andrew Grieve 71b583c390 Reland "Android: Define paths to expectation files in leaf targets"
This reverts commit 44a03014c04fb9e9f2fbc6a5a5daf0040c139b5c.

Reason for reland: Wasn't the culprit (see bug)

Original change's description:
> Revert "Android: Define paths to expectation files in leaf targets"
>
> This reverts commit 4a914f2106e06d3cee338fdd4ee46457e985df97.
>
> Reason for revert: Build failure in https://ci.chromium.org/p/chrome/builders/ci/arm64-unpublished-builder and https://ci.chromium.org/p/chrome/builders/official/android-arm-official-next
>
> Possible reason might be renaming //chrome/android:monochrome_public_bundle__base_libs_and_assets_expectations and //chrome/android:trichrome_chrome_bundle__base_libs_and_assets_expectations
>
> Original change's description:
> > Android: Define paths to expectation files in leaf targets
> >
> > This is easier to follow then deriving it in the templates.
> >
> > Also changes webview expectations apk->bundle
> >
> > Bug: 1095654
> > Change-Id: I5952ee9a660e4f32b22ef4100fea2f231d9eb96d
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2245880
> > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > Reviewed-by: Richard Coles <torne@chromium.org>
> > Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#780157}
>
> TBR=torne@chromium.org,agrieve@chromium.org,mheikal@chromium.org
>
> Change-Id: I8ef314098ae3949d21fc885b885b467314f6d695
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1096987
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252344
> Reviewed-by: Tanmoy Mollik <triploblastic@chromium.org>
> Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#780271}

TBR=torne@chromium.org,agrieve@chromium.org,mheikal@chromium.org,triploblastic@chromium.org

No-Presubmit: true
Bug: 1096987
Change-Id: I67937a8b09d9ecca0be3356ae17fc517c8be5ce0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254438
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#780314}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f1d7031457d40e9faa18eb8d7f3f476bc088a4cc
2020-06-19 15:40:55 +00:00
Tanmoy Mollik 5ced32fccd Revert "Android: Define paths to expectation files in leaf targets"
This reverts commit 4a914f2106e06d3cee338fdd4ee46457e985df97.

Reason for revert: Build failure in https://ci.chromium.org/p/chrome/builders/ci/arm64-unpublished-builder and https://ci.chromium.org/p/chrome/builders/official/android-arm-official-next

Possible reason might be renaming //chrome/android:monochrome_public_bundle__base_libs_and_assets_expectations and //chrome/android:trichrome_chrome_bundle__base_libs_and_assets_expectations

Original change's description:
> Android: Define paths to expectation files in leaf targets
> 
> This is easier to follow then deriving it in the templates.
> 
> Also changes webview expectations apk->bundle
> 
> Bug: 1095654
> Change-Id: I5952ee9a660e4f32b22ef4100fea2f231d9eb96d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2245880
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Richard Coles <torne@chromium.org>
> Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#780157}

TBR=torne@chromium.org,agrieve@chromium.org,mheikal@chromium.org

Change-Id: I8ef314098ae3949d21fc885b885b467314f6d695
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1096987
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252344
Reviewed-by: Tanmoy Mollik <triploblastic@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#780271}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 44a03014c04fb9e9f2fbc6a5a5daf0040c139b5c
2020-06-19 12:55:01 +00:00
Andrew Grieve 7465bac9cb Android: Define paths to expectation files in leaf targets
This is easier to follow then deriving it in the templates.

Also changes webview expectations apk->bundle

Bug: 1095654
Change-Id: I5952ee9a660e4f32b22ef4100fea2f231d9eb96d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2245880
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#780157}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4a914f2106e06d3cee338fdd4ee46457e985df97
2020-06-19 03:47:46 +00:00
Andrew Grieve c2d0003dad Android: Delete unused GN variable "never_goma"
Bug: None
Change-Id: I17a8d301b67a8b2a5fc94f921fd2121a5469e5a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2242640
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#779858}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c071c3b944215137a61c578e1f6db1c10b2f1c56
2020-06-18 16:43:53 +00:00