Commit Graph

4866 Commits

Author SHA1 Message Date
Andrei Onea
4985e518f8 Exclude RequiresApi from generated stubs
This annotation is required for linting, but is not useful in stubs.

Bug: 185579441
Test: cherry-pick http://ag/14098354 and regenerate stubs
Change-Id: I7e4da99a8843b9c709f3b59f125f43cbd66bda4e
2021-04-29 17:00:46 +00:00
Paul Duffin
12d29b7786 Move generation of hidden API make vars to platform_bootclasspath
Bug: 179354495
Test: rm out/soong/make_vars*
      m nothing
      grep INTERNAL_PLATFORM_HIDDENAPI_FLAGS out/soong/make_vars*
      - make sure it is still out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I86e56512a9a2091f446bad25294d41ea1f4341ee
2021-04-29 15:11:35 +01:00
Paul Duffin
e8e530cd2c Merge "Move dumpOatRules to platform_bootclasspath" am: 3f9c16af2d am: 58da3e8a80 am: f062acb20b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686128

Change-Id: I5147ab79dc076264f787a42fa5968683a81760b4
2021-04-29 13:32:34 +00:00
Paul Duffin
c2a9baa7d8 Merge "Move generateUpdatableBcpPackagesRule to platform_bootclasspath" am: e084f1d717 am: b72a9487b8 am: ae23514b50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686154

Change-Id: I8386537936c21f1b0cee4372022220395854428e
2021-04-29 13:32:30 +00:00
Paul Duffin
640d548cf7 Merge "Differentiate between art, non-updatable and updatable modules" am: c1fc9faee6 am: c1c4b84478 am: cba4d88707
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686153

Change-Id: I9912def06a1f8a1b64c93be35b8a3c12e3b3a38b
2021-04-29 13:32:26 +00:00
Paul Duffin
2207583cc9 Merge changes I16389102,I105f4fba am: 12206326d6 am: bbc5cbcf0f am: 8255b2c5d1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689752

Change-Id: Ic76b304687f2c205c5962c39a44aef0a9afc3a8b
2021-04-29 13:32:19 +00:00
Paul Duffin
f062acb20b Merge "Move dumpOatRules to platform_bootclasspath" am: 3f9c16af2d am: 58da3e8a80
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686128

Change-Id: I8d86338ade67b51e019b558ab1a38e855654c58e
2021-04-29 12:53:04 +00:00
Paul Duffin
ae23514b50 Merge "Move generateUpdatableBcpPackagesRule to platform_bootclasspath" am: e084f1d717 am: b72a9487b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686154

Change-Id: I23c5d58bc071017b40a4c6988e9550e5ab102ef6
2021-04-29 12:53:01 +00:00
Paul Duffin
cba4d88707 Merge "Differentiate between art, non-updatable and updatable modules" am: c1fc9faee6 am: c1c4b84478
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686153

Change-Id: I63837609ea1a88ef2223d9317e5b79fe7658b0e8
2021-04-29 12:52:57 +00:00
Paul Duffin
8255b2c5d1 Merge changes I16389102,I105f4fba am: 12206326d6 am: bbc5cbcf0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689752

Change-Id: I0fcae956aba20eb4c2db993396e74bb7949b3700
2021-04-29 12:52:54 +00:00
Paul Duffin
e3ecce67c1 Make platform_bootclasspath a singleton module
This is needed in order to allow it to implement MakeVars so it can
create make variables just like the dexpreopt_bootjars and hiddenapi
singletons currently do.

Bug: 177892522
Bug: 179354495
Test: m nothing
Change-Id: Ida5bf8abeecde531e1f6430151650065445804ac
2021-04-29 13:37:16 +01:00
Paul Duffin
0c22202947 Merge "Add stub_libs properties to bootclasspath_fragment snapshot" am: 50599f7735 am: ce7396186d am: 454efed2ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686206

Change-Id: If2a3d61b51248c32c70fffc13afc39eb73f9d053
2021-04-29 10:52:40 +00:00
Paul Duffin
f7a5592d38 Move dumpOatRules to platform_bootclasspath
Bug: 177892522
Test: m oat-dump-boot
      - test output to make sure that this change does not change the
        generated files, at least no more than no changes do as the
	output from this rule is not deterministic. See b/186459873.

Change-Id: Ib2b4203d9bb1fd0ee9443aee4e58b54b38b491cf
2021-04-29 11:50:48 +01:00
Paul Duffin
4c094428a7 Move generateUpdatableBcpPackagesRule to platform_bootclasspath
Changes generateUpdatableBcpPackagesRule to use ModuleContext instead
of SingletonContext and moves the call from dexpreoptBootJar's
GenerateSingletonBuildActions method to platform_bootclasspath's
GenerateAndroidBuildActions.

Bug: 177892522
Test: lunch art_module_arm64
      m out/soong/module_arm64/dex_bootjars/updatable-bcp-packages.txt
      - make sure it is not affected by this change
Change-Id: I9741ae1eb9573cafe12dd7a17dc1d8449b224dc8
2021-04-29 11:50:48 +01:00
Paul Duffin
01b463bc06 Differentiate between art, non-updatable and updatable modules
Bug: 177892522
Test: lunch art_module_arm64
      m out/soong/module_arm64/dex_bootjars/updatable-bcp-packages.txt
      - make sure it is not affected by this change
Change-Id: I3d35f1664cbbaba5df3f5809859dd9815a26d05d
2021-04-29 11:50:42 +01:00
Paul Duffin
9bacf56564 Extract logic to gather deps added for <apex>:<module> pairs
Trades having to traverse a module's direct dependencies multiple times
for reusable code. While at the minute the amount of duplicated code is
small (checking a tag and appending to a list) follow up changes will
modify the gatherApexModulePairDepsWithTag module to improve error
reporting greatly increasing the benefit of deduping.

The cost of traversing a module's direct dependencies is very small as
there will be only a very few dependencies.

Bug: 177892522
Test: m nothing
Change-Id: I16389102abd8038e1bfa52b63f4153bdf92ff553
2021-04-29 11:34:59 +01:00
Paul Duffin
454efed2ed Merge "Add stub_libs properties to bootclasspath_fragment snapshot" am: 50599f7735 am: ce7396186d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686206

Change-Id: I03ad268a1e143379747212c9724ad90c3ab5865c
2021-04-29 10:17:37 +00:00
Paul Duffin
a7c96bb1e5 Merge "Add support for specifying api provided by bootclasspath_fragment" am: 0948060f50 am: 126a48b0c5 am: e30368dc81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686205

Change-Id: I4216d71d26a2e6256220359c60de0927119f5731
2021-04-29 10:02:29 +00:00
Paul Duffin
e30368dc81 Merge "Add support for specifying api provided by bootclasspath_fragment" am: 0948060f50 am: 126a48b0c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686205

Change-Id: If9064df010fb534a0622024a9be8677f5ccc8b04
2021-04-29 09:46:14 +00:00
Paul Duffin
110b0add9e Treat "apex" system_ext the same as platform
Change https://r.android.com/1672245 added support to treat
system_ext:foo in the boot jars configuration the same as platform:foo,
at least for dexpreopt_bootjars.go's getBootJar.

This change replicates that mechanism in platform_bootclasspath and as
that now handles hidden API processing also made a similar change in
the isModuleInConfiguredList function.

Bug: 177892522
Bug: 154976937
Test: m nothing
Change-Id: I105f4fbaa3b0355b013b7c5618d218d888faefb6
2021-04-29 10:35:10 +01:00
Paul Duffin
895c7140a9 Add stub_libs properties to bootclasspath_fragment snapshot
Bug: 177892522
Test: m nothing
Change-Id: I7644122c4abed8e8bc2cc7b58f408bee3bdc91f6
2021-04-28 22:02:00 +01:00
Paul Duffin
1093158faf Add support for specifying api provided by bootclasspath_fragment
The hidden API processing needs access to dex stub jars for the API
scopes provided by the bootclasspath_fragment so that it can mark the
corresponding dex members as being part of that API. This change adds
the ability to specify the modules that provide those jars, resolve the
modules to dex jar stubs and make them available for other modules and
tests to use.

While the stubs are only needed for hidden API at the moment these were
not added to the hidden_api properties section as there are other parts
of the build that may need to access the stubs in future, e.g. api
fingerprint and aidl generation.

The stubs properties can be affected by coverage as when coverage is
enabled the jacoco-stubs needs adding to the list, just like how
jacocoagent is added to the contents.

Bug: 177892522
Test: m nothing
Change-Id: I31097d1ca45c84adeba4cbb38f693698cb289e99
2021-04-28 21:59:46 +01:00
Andrei-Valentin Onea
bf9b4f53de Merge "Replace source based system server stubs" am: b75031e918 am: b45d115816 am: 4f4d9c9d3c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642101

Change-Id: I9c3a0e3abd30743925d2019492967c6ad763fa0c
2021-04-28 20:22:58 +00:00
Andrei-Valentin Onea
4f4d9c9d3c Merge "Replace source based system server stubs" am: b75031e918 am: b45d115816
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642101

Change-Id: Ic86a8c810b84173c2fe7f06d57a942d2b9082caa
2021-04-28 19:49:38 +00:00
Andrei-Valentin Onea
b75031e918 Merge "Replace source based system server stubs" 2021-04-28 15:06:22 +00:00
Paul Duffin
388c7abb3f Merge "Extract IsModuleInVersionedSdk" am: 8d817b70e6 am: 6c101d7be6 am: 9e21db0381
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689387

Change-Id: I5db0695a6e4ff05a39d6d158aa58b3cdab539d3e
2021-04-28 14:20:34 +00:00
Paul Duffin
9e21db0381 Merge "Extract IsModuleInVersionedSdk" am: 8d817b70e6 am: 6c101d7be6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689387

Change-Id: I02f65fc878c95b33b91fb64b2dd19a9b75f3cdb0
2021-04-28 13:52:42 +00:00
Paul Duffin
8d817b70e6 Merge "Extract IsModuleInVersionedSdk" 2021-04-28 12:58:43 +00:00
Paul Duffin
08d1fab0ee Merge "Extract generateUpdatableBcpPackagesRule from updatableBcpPackagesRule" am: 0e98e86a3c am: ada6da8aa4 am: 28a48992cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686152

Change-Id: If7d4792dd003f4025f5b6f93688d5e42afb64bff
2021-04-28 12:46:24 +00:00
Paul Duffin
318e2c53b2 Merge "Remove special handling of frameworks/base/config/boot-profile.txt" am: c2477e8224 am: 497d026b5b am: 0771c16227
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686151

Change-Id: Id6f5067110e0710f2444f2d725fabad0f08b257f
2021-04-28 12:46:18 +00:00
Paul Duffin
953ee81825 Merge "Move bootFrameworkProfileRule to platform_bootclasspath" am: 9abfff5229 am: eec196310d am: c663ddce59
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686150

Change-Id: Iba0466a5583e5e10b9a42f8708a09431bd7645d3
2021-04-28 12:46:06 +00:00
Paul Duffin
28a48992cd Merge "Extract generateUpdatableBcpPackagesRule from updatableBcpPackagesRule" am: 0e98e86a3c am: ada6da8aa4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686152

Change-Id: I4a75e0b1b2f8977aa3dd16ec0a135c5a06fa7c0c
2021-04-28 12:28:31 +00:00
Paul Duffin
0771c16227 Merge "Remove special handling of frameworks/base/config/boot-profile.txt" am: c2477e8224 am: 497d026b5b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686151

Change-Id: I8ca954a00664950b4a6d494ee10d45d594b29088
2021-04-28 12:28:26 +00:00
Paul Duffin
c663ddce59 Merge "Move bootFrameworkProfileRule to platform_bootclasspath" am: 9abfff5229 am: eec196310d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686150

Change-Id: I9f240c97a1fbee88e51b127822791b0b7bf10f9e
2021-04-28 12:28:08 +00:00
Paul Duffin
466563d5c9 Merge "Automatically export bootclasspath_fragment stubs from sdk" am: 59dc69c2c7 am: 510e829ea5 am: 92659f37b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689068

Change-Id: Ie02075fd7521b5f1d4c10440157c0b79fa7d11f1
2021-04-28 08:07:45 +00:00
Paul Duffin
8cc2b616c1 Merge "Pass module to SdkMemberTypeDependencyTag.SdkMemberType" am: 6a77e77cf9 am: a4e28eb6ef am: ef45d2ce43
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689067

Change-Id: If9d5acbb4aadab4d1b63693a919f1fdce754413b
2021-04-28 08:07:37 +00:00
Paul Duffin
44d1594081 Extract generateUpdatableBcpPackagesRule from updatableBcpPackagesRule
This simplifies the process of moving the updatableBcpPackagesRule to
the platform_bootclasspath by separating the gathering of the list of
updatable modules (which differs between the singleton and the
platform_bootclasspath module) from the gathering of the permitted
packages list and generation of the rule which are generally common.

Bug: 177892522
Test: lunch art_module_arm64
      m out/soong/module_arm64/dex_bootjars/updatable-bcp-packages.txt
      - make sure it is not affected by this change
Change-Id: I3cb64310f618059758a32cfe00d3745d52388e49
2021-04-28 09:03:46 +01:00
Paul Duffin
2ac45f019b Remove special handling of frameworks/base/config/boot-profile.txt
Previously, the method was run in repo manifests that did not include
the frameworks/base repository so it had to handle the file being
missing. However, now that this is being called from
platform_bootclasspath which is only defined in frameworks/base that
is no longer required.

Bug: 177892522
Test: m droid
Change-Id: I77fa5a204d1426a6be24a6f0b48e18f48f3dd908
2021-04-28 09:03:46 +01:00
Paul Duffin
ad19d3858e Move bootFrameworkProfileRule to platform_bootclasspath
Changes bootFrameworkProfileRule to use ModuleContext instead of
SingletonContext and moves the call from dexpreoptBootJar's
GenerateSingletonBuildActions method to platform_bootclasspath's
GenerateAndroidBuildActions.

Changing the context also allows the code to switch from
bootFrameworkProfileRule to GetGlobalSoongConfig.

Also extracts the shouldBuildBootImages function so it can be used by
platform_bootclasspath to preserve the existing behavior.

Bug: 177892522
Test: m droid
Change-Id: I30d3ca10be7f84348ad3aa9cc984dd15b8f6f4e9
2021-04-28 09:03:46 +01:00
Paul Duffin
92659f37b3 Merge "Automatically export bootclasspath_fragment stubs from sdk" am: 59dc69c2c7 am: 510e829ea5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689068

Change-Id: Id0d7393cc95b38579e11769d4c9fc61036603827
2021-04-28 07:34:58 +00:00
Paul Duffin
ef45d2ce43 Merge "Pass module to SdkMemberTypeDependencyTag.SdkMemberType" am: 6a77e77cf9 am: a4e28eb6ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689067

Change-Id: Ie49d51cba706e0d5c568b5e3ef3fa8f5febc2061
2021-04-28 07:34:48 +00:00
Paul Duffin
0c2e08312c Extract IsModuleInVersionedSdk
Bug: 177892522
Test: m nothing
Change-Id: I348d380a0d29abdd6a84420be52cc1b674f2a7ab
2021-04-28 00:39:52 +01:00
Paul Duffin
976b0e5bbb Automatically export bootclasspath_fragment stubs from sdk
This change makes the tag that is used to add dependencies onto stubs
from the bootclaspath_fragment module cause the dependency to be
automatically exported from the sdk. If the dependency is a
java_sdk_library then it will be as if it was added to the
java_sdk_libs property, otherwise it will be as if it was added to the
java_header_libs property instead.

Bug: 177892522
Test: m nothing
Change-Id: I97010c4342dd39415dba81a4395db7831410436e
2021-04-27 23:27:34 +01:00
Paul Duffin
eee466e439 Pass module to SdkMemberTypeDependencyTag.SdkMemberType
This change allows an SdkMemberTypeDependencyTag to select the
SdkMemberType to use to add a dependency based on the module.

Bug: 177892522
Test: m nothing
Change-Id: I2d6e51b615636dc7cd41da65808ef851dd8ae6ac
2021-04-27 23:23:20 +01:00
Paul Duffin
7fbc5842cd Merge "Extract default image specific logic from buildBootImage" am: 6d4de43833 am: 29b18b8c17 am: 8db612ebab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686149

Change-Id: Ic8a3591508399db477da9a72f21ee9619373cebc
2021-04-27 17:43:17 +00:00
Paul Duffin
6aa72dca5e Merge "Simplify missing deps handling in buildBootImage" am: c42a738bc4 am: c7cf6ac1e7 am: 3d87058cf8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686148

Change-Id: I9a4ec33c1b70563b23791588f132444cc384d7f7
2021-04-27 17:43:11 +00:00
Paul Duffin
67cb5fb7f3 Merge "Remove panics from reportMissingVariationDependency" am: a75af16878 am: b49dae2874 am: 539a24e1d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686147

Change-Id: I8e184836ffec1c13cbefc802db9761999a0f0dfd
2021-04-27 17:43:02 +00:00
Paul Duffin
8db612ebab Merge "Extract default image specific logic from buildBootImage" am: 6d4de43833 am: 29b18b8c17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686149

Change-Id: Ifd9767dc1b40ac4a5346c7528329fb314aadfddc
2021-04-27 17:42:25 +00:00
Paul Duffin
3d87058cf8 Merge "Simplify missing deps handling in buildBootImage" am: c42a738bc4 am: c7cf6ac1e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686148

Change-Id: I9d5ef5fce5a283d55e7128fd41869e6dd8db5ff0
2021-04-27 17:42:16 +00:00
Paul Duffin
539a24e1d0 Merge "Remove panics from reportMissingVariationDependency" am: a75af16878 am: b49dae2874
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686147

Change-Id: Ie70916fa9d33bf32e9e6bd41506e07d7a721e391
2021-04-27 17:41:55 +00:00