Commit Graph

34391 Commits

Author SHA1 Message Date
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
Paul Duffin
9d697b3d94 Merge "Remove deapexer and prebuilt apex select mutators" am: 4b786d2da1 am: 0630dacc0c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610795

MUST ONLY BE SUBMITTED BY AUTOMERGER

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I44f751341142834cb89503ec263d1c20ad15ce29
2021-03-02 22:28:44 +00:00
Paul Duffin
0630dacc0c Merge "Remove deapexer and prebuilt apex select mutators" am: 4b786d2da1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610795

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia285f625de493e02e8b2f0ea5aa6a245927bc581
2021-03-02 22:27:27 +00:00
Paul Duffin
196fe7325a Merge "Verify the prebuilt_apex selects the correct input apex file" am: 9b41efabd1 am: b267e12670
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610797

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaa64f22f2afa5172702482999c3b861aec0d39ff
2021-03-02 21:50:49 +00:00
Paul Duffin
906fb68c12 Merge "Add test to verify the deapexer rule's input apex file" am: 30c9fe93e0 am: 6f342644d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610796

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I65700e9f3b7e1d87bf8a755b249bf176417ddcd9
2021-03-02 21:50:08 +00:00
Paul Duffin
b267e12670 Merge "Verify the prebuilt_apex selects the correct input apex file" am: 9b41efabd1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610797

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I422ccc35977e0be846bb7a3497a50c2fc2c42e92
2021-03-02 21:36:01 +00:00
Paul Duffin
6f342644d0 Merge "Add test to verify the deapexer rule's input apex file" am: 30c9fe93e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610796

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibb6beaaa979cb14cf005a9bed7fd851253f91115
2021-03-02 21:26:58 +00:00
Lukács T. Berki
1716791150 Merge "Move environment staleness check to soong_ui." am: b821b9b852 am: b6593f138a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1606677

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I922490015ae619e9836b06adc0e8cbee8337fe4a
2021-03-02 20:39:55 +00:00
Lukács T. Berki
b6593f138a Merge "Move environment staleness check to soong_ui." am: b821b9b852
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1606677

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I967e74f6ab0c05308455b658fd00574642acf8de
2021-03-02 20:09:17 +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
Martin Stjernholm
b85c77714a Merge "Recognise the Google-signed ART APEXes as well." am: cfcaddc5b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1590194

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I81c3363b5d207c7eee5955a01d1bddeb9a8e3704
2021-03-02 19:04:35 +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
Paul Duffin
4b786d2da1 Merge "Remove deapexer and prebuilt apex select mutators" 2021-03-02 10:48:29 +00:00
Paul Duffin
9b41efabd1 Merge "Verify the prebuilt_apex selects the correct input apex file" 2021-03-02 10:47:48 +00:00
Paul Duffin
30c9fe93e0 Merge "Add test to verify the deapexer rule's input apex file" 2021-03-02 10:47:33 +00:00
Lukács T. Berki
b821b9b852 Merge "Move environment staleness check to soong_ui." 2021-03-02 09:44:18 +00:00
Lukacs T. Berki
3243aa51eb Move environment staleness check to soong_ui.
Also delete the now-unnecessary soong_env binary.

Test: Manually. Also checked what happens when a used environment
variable changes.

Change-Id: Ib393e7f444e94819198c6cce4bcd8719d9fd9441
2021-03-02 09:32:49 +01:00
Martin Stjernholm
cfcaddc5b2 Merge "Recognise the Google-signed ART APEXes as well." 2021-03-02 08:14:55 +00:00
Treehugger Robot
803eece603 Merge "APEX uses the latest version of the stub" am: ce80f18749 am: 3310e2d9ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609533

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0378b9870949effb36b58bd709626ee0f821f5c2
2021-03-02 02:22:46 +00:00
Treehugger Robot
3310e2d9ea Merge "APEX uses the latest version of the stub" am: ce80f18749
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609533

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I294103da51c7a9ad11a81e3eadb1a0e2e98920e8
2021-03-02 02:03:34 +00:00
Treehugger Robot
ce80f18749 Merge "APEX uses the latest version of the stub" 2021-03-02 01:02:18 +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
Paul Duffin
551d57c064 Merge "Avoid hiddenapi ignoring prebuilt with missing dex implementation jar" am: c572b5bf62
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609479

MUST ONLY BE SUBMITTED BY AUTOMERGER

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9c06fde9d8d3f34ec60bea58bfa39f5dc98a66bd
2021-03-01 19:31:06 +00:00
Paul Duffin
b1426419ec Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" am: 0a8d5248ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia9e4f4591c7fc3ee8ab303635a71ac84b1a99327
2021-03-01 19:30:32 +00:00
Paul Duffin
c04fb9e6a2 Remove deapexer and prebuilt apex select mutators
Originally, when the prebuilt_apex was first created, it selected the
source to use in its DepsMutator. It did that because that was a
convenient place for it to perform that work which had to be:
* After the arch mutator had run so MultiTargets() was available.
* Before the prebuilt_select mutator runs as that relied on the Source
  property to have been set.

Change 064b70c9 then duplicated the call from the DepsMutator of the
deapexer module type that was added as part of the work to make dex
files available for hiddenapi processing.

Change 356f7d45 moved it out of the the DepsMutator methods into its
their own mutators, presumably because it interfered with the
Soong -> Bazel conversion work.

This change improves the existing PrebuiltSrcsSupplier mechanism to
support reporting errors so that the logic for selecting the source can
be done on demand rather than in separate mutators.

The main complication was that PrebuiltSrcsSupplier is called with a
BaseModuleContext for both source and prebuilt modules so it cannot use
any methods on it that are related to the current module. That
necessitated adding MultiTargets() to android.Module.

Bug: 181267622
Test: m droid
Change-Id: I106c78fd21016f051a315b82b470d8f12b1f820b
2021-03-01 17:11:25 +00:00
Paul Duffin
0d10c3c304 Verify the prebuilt_apex selects the correct input apex file
This will ensure that the following refactoring does not change the
behavior.

Bug: 181267622
Test: m nothing
Change-Id: Ieb9b37c2a1ef609b2d6565c54c261439a1ce7147
2021-03-01 17:10:31 +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
Paul Duffin
0a8d5248ef Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" 2021-03-01 17:04:27 +00:00
Jingwen Chen
f28de7434b Merge "bp2build: add configurable attribute (select) support." am: 37bd24a1db am: 1c65191027
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1603778

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9795ead95b078025e65f90a5534935a2b137a30a
2021-03-01 15:24:31 +00:00
Jingwen Chen
1c65191027 Merge "bp2build: add configurable attribute (select) support." am: 37bd24a1db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1603778

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib6ebd3defe385a6b8f3bfcc9eda56b3bd7deb03e
2021-03-01 14:16:57 +00:00
Jingwen Chen
37bd24a1db Merge "bp2build: add configurable attribute (select) support." 2021-03-01 13:43:55 +00:00
Paul Duffin
f6932afeae Add test to verify the deapexer rule's input apex file
This will ensure that the following refactoring does not change the
behavior.

Bug: 181267622
Test: m nothing
Change-Id: I36ae9ec9a0a7977bd394f4100c72941052d763ac
2021-03-01 13:40:06 +00:00
Paul Duffin
ec0fe1775b Avoid hiddenapi ignoring prebuilt with missing dex implementation jar
Previously, when a prebuilt was preferred but did not provide a
suitable boot dex jar both the source and the prebuilt were silently
ignored which meant that the "hiddenapi list" command was not given a
complete set of boot dex jars. That could either lead to incorrect
hiddenapi flags being set or the "hiddenapi list" command failing if it
could not find a class. Debugging the cause of either of those cases
can be very time consuming so this change fails early and makes the
cause very explicit.

Bug: 181267622
Test: m nothing
Change-Id: I6763ddb9ba90ed2e501d0cf7984f6655237e905d
2021-03-01 12:58:28 +00:00
Paul Duffin
3785673f9b Allow java_sdk_library_import to contribute to hiddenapi processing
Invokes hiddenAPIExtractInformation() on the java_sdk_library_import's
dex implementation jar provided by the deapexer (on behalf of
prebuilt_apex) so that hiddenAPI can extract the information it needs,
if anything, from the dex file.

The dex file provided by deapexer has already had the hiddenapi
information encoded into it so it does not need to do that again.

Usually, it would require a classes implementation jar as well in
order to extract information from UnsupportedAppUsage annotations but
that is not available for a java_sdk_library_import. Fortunately, the
modules that are currently affected by this do not contain any such
annotations. This just uses a public api stubs jar instead.

Bug: 181267622
Test: m nothing
Change-Id: I96275e46f8b7fecba88075319e9f2da5ae315c03
2021-03-01 12:58:28 +00:00
Paul Duffin
3985351df6 Retrieve dex implementation jars from apex for java_sdk_library_import
Bug: 181267622
Test: m nothing
Change-Id: Idd6af2482f48bd3a05db88b8a06dbbbdee01ef78
2021-03-01 12:58:28 +00:00
Treehugger Robot
416eb1e44b Merge "Remove global state from sysprop libraries" am: 5e510d6271 am: 184957859b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1611293

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I10e6a378c6ef9cc1775b29e6d96c0aadc90a0ef1
2021-03-01 09:25:25 +00:00
Jiyong Park
55549df051 APEX uses the latest version of the stub
Previously when an APEX whose min_sdk_version is set is linked to an
external library providing multiple versions of stubs, the
maximum version that is less than or equal to the min_sdk_version was
chosen. For example, if the versions of a library stubs are 28, 29, 30,
and 31, then APEX with min_sdk_version: 29 linked to the version 29 of
the stub.

This was to ensure that the APEX doesn't use any new APIs whose
existence can't be guaranteed.

This however imposes a severe restriction that the APEX can never use
new APIs even when the APIs are actually available: i.e. when the
APEX is running on a newer platform.

With the recent work about unguarded availability, using the future APIs
became much safer. When you use an API that is newer than your
min_sdk_version, the API is automatically declared as a weak symbol
(thus no link error at runtime), while the call to API is guaranteed to
be guarded with the `__builtin_available(...)` macro.

So, there really is no reason to use the old version of the stub. We can
always use the latest version of stub safely.

Bug: N/A
Test: m
Change-Id: Iaac0d8761d8929154527dc2e861a51ae31e23d49
2021-03-01 09:12:32 +00:00
Treehugger Robot
184957859b Merge "Remove global state from sysprop libraries" am: 5e510d6271
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1611293

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1fca3c2ce55e93086372c6c69b0704fa253175a1
2021-03-01 08:45:05 +00:00
Treehugger Robot
5e510d6271 Merge "Remove global state from sysprop libraries" 2021-03-01 08:03:41 +00:00
Treehugger Robot
5541754e5a Merge "Propagate java resources in apps with no code" am: 2ee47272f5 am: f6316c4b1c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610973

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic9f21c21508658da4cad91202315e3589b939c7f
2021-02-28 02:09:14 +00:00
Treehugger Robot
f6316c4b1c Merge "Propagate java resources in apps with no code" am: 2ee47272f5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610973

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9a2dc3f9b861898eb7ed91d13c1443af2a0d2569
2021-02-28 01:20:09 +00:00