Commit Graph

3588 Commits

Author SHA1 Message Date
Jaewoong Jung
f10cb18a20 Merge "Add additional_certificates to android_app_import." am: 05ebca4f7f am: 6ea8f69bc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1622565

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9ccbc3abbfad8807ca00f4fd27a23d975483f6b3
2021-03-09 15:44:34 +00:00
Jaewoong Jung
05ebca4f7f Merge "Add additional_certificates to android_app_import." 2021-03-09 14:55:24 +00:00
Ulyana Trafimovich
6afbccdbc8 Merge "Disable verify_uses_libraries check if dexpreopt is globally disabled." am: 35570c14ce am: 3d7489c1e1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1615200

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4bc1508470878ca1cdefe4978854642001d029ab
2021-03-09 10:06:19 +00:00
Ulyana Trafimovich
35570c14ce Merge "Disable verify_uses_libraries check if dexpreopt is globally disabled." 2021-03-09 08:40:23 +00:00
Jaewoong Jung
25ae8dec91 Add additional_certificates to android_app_import.
Bug: 182175153
Test: app_import_test,go
Change-Id: I467e98065945b59dcc574a18144756edccdea441
2021-03-08 17:37:46 -08:00
Colin Cross
6426ae5a73 Merge "Support robolectric prebuilts in android_robolectric_test" am: 7314fedd37 am: d5e78d1c17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621781

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4c3d6e50e5c3968da29ed1f88198a5545aef0ee9
2021-03-08 20:09:31 +00:00
Colin Cross
7314fedd37 Merge "Support robolectric prebuilts in android_robolectric_test" 2021-03-08 19:08:10 +00:00
Paul Duffin
1f50ff0df6 Merge "Clean up cc.RegisterRequiredBuildComponentsForTest()" am: 0805d4ebdd am: b6ae322278
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621414

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I98e32ff064e2d6617387c55a9eb4d8e331d0d17b
2021-03-06 09:06:22 +00:00
Paul Duffin
0805d4ebdd Merge "Clean up cc.RegisterRequiredBuildComponentsForTest()" 2021-03-06 08:43:56 +00:00
Julien Desprez
a0ad77e293 Merge "Revert "Revert "Attempt to run all java_test_host that look unit..."" am: b1778a42cb am: 77294d573e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621859

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifd83baecee3bd7c1a608a249a9e97e7bbb1b389d
2021-03-06 03:40:52 +00:00
Julien Desprez
b1778a42cb Merge "Revert "Revert "Attempt to run all java_test_host that look unit..."" 2021-03-06 02:40:44 +00:00
Colin Cross
7cbf691298 Merge "Exempt framework-res from UseApiFingerprint" am: cd2df5dec6 am: 7b91027296
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621782

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3069018a92d5cad99f59cd7db008c02025e7c8bc
2021-03-06 00:58:32 +00:00
Colin Cross
0a0763a8a7 Merge changes from topic "lint_repackage" am: 3903d401d0 am: 9c574a8575
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619574

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7576f269f572f458aa854e34e952b72a6cac7e97
2021-03-06 00:58:14 +00:00
Colin Cross
cd2df5dec6 Merge "Exempt framework-res from UseApiFingerprint" 2021-03-05 23:34:37 +00:00
Colin Cross
3903d401d0 Merge changes from topic "lint_repackage"
* changes:
  Remove lint outputs to prevent showing old lint results on error
  Make common dependencies of lint use restat
  Use repackaged lint binary
2021-03-05 23:34:14 +00:00
Jaewoong Jung
d9119bc38f Merge "Clear remains of java.Dependency interface." am: 083e6cd267 am: a021326e92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620201

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id792437df796baa03e9f02fb24c9263342658edf
2021-03-05 22:35:34 +00:00
Colin Cross
2669e7edf0 Exempt framework-res from UseApiFingerprint
Generating the API fingerpring depends on framework-res, so the
fingerprint cannot be embedded into framework-res.  Hardcode an
exemption to UseApiFingerprint.

Bug: 181978889
Test: TARGET_BUILD_VARIANT=user UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true vendor/google/build/build_mainline_modules.sh
Change-Id: I621f36d5eb157dd97baa132ff109b4df791eedcc
2021-03-05 19:54:31 +00:00
Colin Cross
2787e8e65e Support robolectric prebuilts in android_robolectric_test
The version of robolectric in external/robolectric-shadows is based
on 4.1 and is difficult to update.  Support using the prebuilt versions
in prebuilts/misc/common/robolectric, with the caveat that they won't
support the in-progress SDK version.

Bug: 181886851
Test: manual
Change-Id: Ie3a861cf6d637f97cf00212c02322f92c1043f0a
2021-03-05 19:22:30 +00:00
Paul Duffin
d6ceb8600c Clean up cc.RegisterRequiredBuildComponentsForTest()
Changes this function so it only registers components from the cc
package by pushing the call to genrule.RegisterGenruleBuildComponents()
down into those packages whose tests need it.

This will make it easier to migrate cc package tests to test fixtures
as the RegisterRequiredBuildComponentsForTest() no longer overlaps with
preparers from the genrule packages.

Bug: 181070625
Test: m nothing
Change-Id: Ic00c7e480dc738d7a88d038aca6ab95a1502a24a
2021-03-05 18:20:33 +00:00
Julien Desprez
b216661e84 Revert "Revert "Attempt to run all java_test_host that look unit..."
Revert reland the change after tests have been fixed

Reason for revert: relanding after fixes
Reverted Changes:
I89fbce4d7:Revert "Exclude some tests for java_test_host onbo...
Iaa89f9b7e:Revert "Attempt to run all java_test_host that loo...

Change-Id: Idaa80b2d5a8d3ba026e33b453bd163a4e2d31118
2021-03-05 18:08:36 +00:00
Jaewoong Jung
62751102a9 Clear remains of java.Dependency interface.
Test: TreeHugger
Change-Id: If9dab2022a308b776d7ad760a61f0db97509b9b2
2021-03-05 14:57:51 +00:00
Julien Desprez
97b3107dbd Merge "Revert "Attempt to run all java_test_host that look unit tests"" am: bbfd5f5e7c am: f1fb4af6e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619801

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic27644feb15de79119e81edb4c1c69b6b6688b0d
2021-03-05 05:54:51 +00:00
Julien Desprez
bbfd5f5e7c Merge "Revert "Attempt to run all java_test_host that look unit tests"" 2021-03-04 21:50:34 +00:00
Julien Desprez
1ab84fa433 Revert "Attempt to run all java_test_host that look unit tests"
Revert submission 1597083-java_test_host_default

Reason for revert: Getting ready for b/181888225 just in case
Reverted Changes:
I220551549:Attempt to run all java_test_host that look unit t...
I29dbbbf46:Exclude some tests for java_test_host onboarding

Change-Id: Iaa89f9b7e9ad72ed962cef285c70a6263e63ffd5
2021-03-04 21:08:36 +00:00
Ulya Trafimovich
6e55ef157c Disable verify_uses_libraries check if dexpreopt is globally disabled.
Without dexpreopt the check is not necessary, and although it is good to
have, it is difficult to maintain on non-linux build platforms where
dexpreopt is generally disabled (the check may fail due to various
unrelated reasons, such as a failure to get manifest from an APK).

Bug: 181570790
Bug: 132357300
Test: m nothing
Change-Id: Ie012690e8f047ae9256e26565d162c19af4e8921
2021-03-04 18:40:40 +00:00
Colin Cross
5c113d13eb Remove lint outputs to prevent showing old lint results on error
The lint rules dumped the text output file to stdout on error.  If the
lint binary exited without updating the output file it would show old
results.

Remove the output files before running lint, and only dump the text
output file if it exists.

Bug: 181681346
Test: m lint-check
Change-Id: I4fa962b1212e8715f234912a9a5e049d5c1540e8
2021-03-04 10:01:34 -08:00
Colin Cross
00d93b143f Make common dependencies of lint use restat
Use restat for the api_versions.xml and annotations.zip dependencies
of lint so that frameworks/base changes don't always result in
rerunning lint on every module.

Bug: 181681346
Test: m lint-check
Change-Id: Ic6a540b41cf79b21441311a8baefe528a3d90d8b
2021-03-04 10:00:09 -08:00
Colin Cross
84f3dc1c9d Use repackaged lint binary
Lint references lint-classpath.jar, which does not contain any classes
by has a manifest that points to other jars for the classpath.  This
breaks dependency tracking during the build.  Use a lint tool that
is repackaged into a single jar.

Bug: 181681346
Test: m lint-check
Change-Id: I07d2b7404c18626e03c5af3ef5a75dd7f899cb0e
2021-03-04 09:56:15 -08:00
Lukács T. Berki
13dac96f2c Merge "cd to / before running soong_build ." am: ddebd2c82a am: db9632fbd0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609473

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6fb83ce60ddefcfdff85db83c05a9fc45dc27a9c
2021-03-04 08:37:36 +00:00
Lukács T. Berki
ddebd2c82a Merge "cd to / before running soong_build ." 2021-03-04 07:07:02 +00:00
Julien Desprez
e2af725162 Merge "Attempt to run all java_test_host that look unit tests" am: ce45b73070 am: e4e279ec9e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1597083

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3d26cf98224741a15341c6ba09d1371c8ae1c838
2021-03-04 04:41:41 +00:00
Julien Desprez
ce45b73070 Merge "Attempt to run all java_test_host that look unit tests" 2021-03-04 02:00:58 +00:00
Lukacs T. Berki
7690c09953 cd to / before running soong_build .
This lets one avoid any decisions as to when to chdir there during its
execution and leads to better sandboxing because the pwd doesn't leak to
init() functions anymore.

Test: Manual.
Change-Id: I1560da8ed3a621249426f9e8908aa890c21e13ba
2021-03-03 09:14:22 +01:00
Ulyana Trafimovich
d0f9821127 Merge "Do verify_uses_libraries check for APKs after patching library names." am: 97df5e65b0 am: e073aa2af2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609481

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I100a6591ff3357d0129a090d0303cbf662766351
2021-03-02 23:25:17 +00:00
Ulyana Trafimovich
939809b6ce Merge "Respect provides_uses_lib for modules added via [optional_]uses_libs" am: ae5cdfffa3 am: a9860b8a8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609480

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib5b3fe2b21b9b2186196e0b38a43cdf561f36a56
2021-03-02 23:24:52 +00:00
Ulyana Trafimovich
eaaa895ff1 Merge "Add provides_uses_library example to TestUsesLibrary check." am: 71284b60ae am: 5da4dcf21a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609476

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0de2a9a5d645e85cea017271d6e06efa1cd28111
2021-03-02 23:24:46 +00:00
Ulyana Trafimovich
4b40d94a40 Merge "Stricten TestUsesLibrary check." am: 00c27b7a68 am: 45e3b00b56
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609474

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I63c0525dc47669828727988067ba8f223e913992
2021-03-02 23:24:40 +00:00
Martin Stjernholm
cbe5663663 Merge "Recognise the Google-signed ART APEXes as well." am: cfcaddc5b2 am: b85c77714a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1590194

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifa8f29e7a513ca4ee28b08727b496ead452b9e40
2021-03-02 19:49:59 +00:00
Ulyana Trafimovich
97df5e65b0 Merge "Do verify_uses_libraries check for APKs after patching library names." 2021-03-02 13:49:34 +00:00
Ulyana Trafimovich
ae5cdfffa3 Merge "Respect provides_uses_lib for modules added via [optional_]uses_libs" 2021-03-02 13:47:03 +00:00
Ulyana Trafimovich
71284b60ae Merge "Add provides_uses_library example to TestUsesLibrary check." 2021-03-02 13:46:49 +00:00
Ulyana Trafimovich
00c27b7a68 Merge "Stricten TestUsesLibrary check." 2021-03-02 13:46:19 +00:00
Martin Stjernholm
db5138230d Recognise the Google-signed ART APEXes as well.
Test: `m nothing` in internal tree
Bug: 180325915
Change-Id: I83eb660ad7cb480fba2a7874ee7e7f9d35646871
2021-03-01 22:33:51 +00:00
Paul Duffin
df806bcfca Merge "Avoid hiddenapi ignoring prebuilt with missing dex implementation jar" am: c572b5bf62 am: 551d57c064
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609479

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I40d9a8d2ee00277bd1790bb80a8237020f3643ba
2021-03-01 20:10:01 +00:00
Paul Duffin
08515806b9 Merge "Allow java_sdk_library_import to contribute to hiddenapi processing" am: 69804ac388 am: 764a15f4e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609478

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia22b20976de4b81e4e97026ceae4213309a28b5e
2021-03-01 20:09:21 +00:00
Paul Duffin
86d8214509 Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" am: 0a8d5248ef am: b1426419ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0dc9e98b69c22ceb22d109ee412f59d3fb5e4819
2021-03-01 20:08:56 +00:00
Ulya Trafimovich
fe927a265e Do verify_uses_libraries check for APKs after patching library names.
Some of the `uses_libs`/`optional_uses_libs` libraries may have a
library name that is different from the module name. In that case it is
necessary to patch these properties after `provides_uses_lib` for the
library is applied.

Bug: 132357300
Test: m nothing
Change-Id: I2e2248053787557f955a6b363c22e3bad0301ec7
2021-03-01 17:50:16 +00:00
Ulya Trafimovich
eea486a580 Respect provides_uses_lib for modules added via [optional_]uses_libs
Previously `provides_uses_lib` property affected only those
<uses-library> dependencies that are automatically deduced by Soong as
implicit Java SDK libraries reachable from the `libs` property. Other
<uses-library> dependencies that are explicitly added in `uses_libs` and
`optional_uses_libs` properties ignored `provides_uses_lib`.

As TestUsesLibraries shows (see the TODOs), Soong behaviour is still
incorrect in two ways (to be addressed in follow-up CLs):

- `uses_libs`/`optional_uses_libs` are passed to manifest_fixer
- verify_uses_libraries check is based on `uses_libs`/
  `optional_uses_libs`, and not on the CLC as it should be

Bug: 132357300
Test: m nothing
Change-Id: I0ec7aab9dcd44554d1a79ddd382491c562266fa3
2021-03-01 17:31:23 +00:00
Paul Duffin
c572b5bf62 Merge "Avoid hiddenapi ignoring prebuilt with missing dex implementation jar" 2021-03-01 17:04:53 +00:00
Paul Duffin
69804ac388 Merge "Allow java_sdk_library_import to contribute to hiddenapi processing" 2021-03-01 17:04:39 +00:00