Commit Graph

4403 Commits

Author SHA1 Message Date
satayev
84ea699fcc Merge "Introduce classpath_fragment.go." am: 86628403e9 am: 94a783223d am: f92ad57372
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670069

Change-Id: I101ad1b1446fde0583833c8a36a07a962b7e0aa1
2021-04-13 13:07:53 +00:00
satayev
f92ad57372 Merge "Introduce classpath_fragment.go." am: 86628403e9 am: 94a783223d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670069

Change-Id: Id9da955035530a1b64b987f83cebf8c729df65df
2021-04-13 12:15:02 +00:00
Jiyong Park
3db6f99780 Merge "SdkSpec is fully using ApiLevel" into sc-dev 2021-04-13 11:02:38 +00:00
Artur Satayev
eabf2c175f Introduce classpath_fragment.go.
A skeleton of a classpath fragment's interface and base to be used by
any modules that provide entries for *CLASSPATH variables at runtime.

In follow up changes, this would be extended to generate
packages/modules/SdkExtensions/proto/classpaths.proto configs for such
modules to be bundled into system and individual apex binaries.

Bug: 180105615
Test: m
Change-Id: I2df550862e97222c5650c4d0480c90231fd78ef0
2021-04-13 08:58:18 +01:00
Paul Duffin
687953c126 Merge "Move generation of global hidden API flags to platform_bootclasspath" am: 26bd783d0b am: 3f13b50d6f am: a4daf9ee74
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670072

Change-Id: Id03314ff46c39781018b6dc6161cb54bacf61fc7
2021-04-12 20:59:22 +00:00
Paul Duffin
73e07f6a77 Merge "Extract ruleToGenerateHiddenApiFlags" am: 690d5f2c7d am: 215b99f3d2 am: e6b5c9ef56
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670071

Change-Id: I4be712b2085fa6123fad4005c5f7b8617cb2e9e0
2021-04-12 20:59:09 +00:00
Paul Duffin
a4daf9ee74 Merge "Move generation of global hidden API flags to platform_bootclasspath" am: 26bd783d0b am: 3f13b50d6f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670072

Change-Id: Ic46e24de3f500d81f63bd9da67b9541741f1a192
2021-04-12 20:08:58 +00:00
Paul Duffin
e6b5c9ef56 Merge "Extract ruleToGenerateHiddenApiFlags" am: 690d5f2c7d am: 215b99f3d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670071

Change-Id: I40995e074ad7a06642d84dcb87e1f0d1a5e59b4c
2021-04-12 20:08:31 +00:00
Paul Duffin
702210b804 Move generation of global hidden API flags to platform_bootclasspath
This change moves the generation of the global hidden API flags from
the singleton to the platform_bootclasspath module. It involves:
1. Moving the ruleToGenerateHiddenApiFlags to hiddenapi_modular.go.
2. Adding HiddenAPIAugmentationProperties to be used by the
   platform_bootclasspath type.
3. Moving the file paths into the platform-bootclasspath module
   definition in frameworks/base/boot/Android.bp.

The flagsRule is kept as a placeholder for now. The emptyFlagsRule is
also kept so that builds continue to work even when the frameworks/base
repository is not present.

Bug: 177892522
Test: verified that the out/soong/hiddenapi/... files are unchanged
      by this change
Change-Id: Idf4dd414a016831bfe04a01f93234c1c33819881
2021-04-12 11:04:24 +01:00
Paul Duffin
c6bb7cf8d7 Extract ruleToGenerateHiddenApiFlags
Extracts the code for creating the rule that creates the monolithic
hidden API flags file which is encoded into dex implementation jars.
This refactoring is in preparation for moving the functionality from
the hiddenapi_singleton into the platform_bootclasspath.

A follow up change will move the method into the new
hiddenapi_modular.go alongside the hiddenAPIAugmentationInfo as they
will both be used to perform hidden API processing for a
bootclasspath_fragment.

Bug: 177892522
Test: verified that the out/soong/hiddenapi/... files are unchanged
      by this change
Change-Id: I2729afa80cdfd2d1d4717365001648453d65632f
2021-04-12 11:04:09 +01:00
Jiyong Park
dbd710c426 SdkSpec is fully using ApiLevel
Previously, SdkSpec was constructed only from the user string. It didn't
make use of the Config struct where information about the latest stable
SDK version, etc. is recorded. As a result, the build system couldn't
check if the sdk version "current" is referring to the in-development
(i.e.  not-yet-frozen) SDK version or the latest stable version.
"current" was always assumed to be in-development (IsPreview() returns
true) even when Platform_sdk_final == true.

As the first step for fixing that, this change requires
android.EarlyModuleContext to be passed when constructing SdkSpec from
the user string.

In the following changes, "current" will be mapped to either
FutureApiLevel (10000) or one of the FinalApiLevels() depending on
whether the platform SDK was finalized or not.

Bug: 175678607
Test: m
Change-Id: Ifea12ebf147ecccf12e7266dd382819806571543
2021-04-12 13:46:21 +09:00
Paul Duffin
2fe363ff6a Merge "Allow platform_bootclasspath to specify contributing fragments" am: 49ab1d38de am: 75e90d6974 am: 4a385f9987
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670067

Change-Id: Ie7e07eb17dd14aaec57b9c9de02483c8869ef309
2021-04-08 21:55:58 +00:00
Paul Duffin
ea1ef0beaf Merge "Add dependencies from platform_bootclasspath to contents" am: d32118c5c4 am: 6caf7f9662 am: 42418e09a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670066

Change-Id: I564c75f572a5ad78f66695829b50ec999423addc
2021-04-08 21:55:51 +00:00
Paul Duffin
4a385f9987 Merge "Allow platform_bootclasspath to specify contributing fragments" am: 49ab1d38de am: 75e90d6974
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670067

Change-Id: Ib3304ee0007baf2518219472703407186e0bb95a
2021-04-08 21:07:08 +00:00
Paul Duffin
42418e09a2 Merge "Add dependencies from platform_bootclasspath to contents" am: d32118c5c4 am: 6caf7f9662
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670066

Change-Id: I34fc991b5efafc5df447dc4fd783d1734d0737be
2021-04-08 21:07:02 +00:00
Paul Duffin
62d8c3b110 Allow platform_bootclasspath to specify contributing fragments
Adds the fragments property to the platform_bootclasspath to allow the
fragments that contribute to it to be specified.

Bug: 177892522
Test: m nothing
Change-Id: I14f83d9336f6984442c7315cc86dfdd0a0fd2d20
2021-04-08 18:53:04 +01:00
Paul Duffin
b432df9cda Add dependencies from platform_bootclasspath to contents
Adds a FinalDeps mutator to add dependencies from the
platform_bootclasspath to the configured boot jars which can be from
either the platform or any apex. It adds dependencies for every
configured boot jar, whether in ArtApexJars, BootJars or
UpdatableBootJars.

At the moment the dependencies are only used for testing purposes
but following changes will make more use of them.

Bug: 177892522
Test: m nothing
Change-Id: I981305bf45bc20539a3d36987252f490e2b885cc
2021-04-08 18:53:04 +01:00
Anton Hansson
57e91234db Merge "Fix bug in sdk_library string matching" am: f247ff73ae am: abde6d24d4 am: aa963fda38
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665886

Change-Id: I4603a16491e348520fa13cf5b086314ef26e12cf
2021-04-08 11:22:16 +00:00
Anton Hansson
aa963fda38 Merge "Fix bug in sdk_library string matching" am: f247ff73ae am: abde6d24d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665886

Change-Id: I5eb9be1a5cbc964f5bfe89077b381625d52f4de5
2021-04-08 10:36:03 +00:00
Anton Hansson
f247ff73ae Merge "Fix bug in sdk_library string matching" 2021-04-08 09:28:41 +00:00
Paul Duffin
c9ad0982b6 resolve merge conflicts of 2f71f4eee9 to sc-dev
Bug: 179354495
Test: m nothing
Change-Id: Iff987f29e2c333fa7515c31acc0ab2d25bd0b791
2021-04-07 20:16:18 +01:00
Paul Duffin
2f71f4eee9 Merge "Update build to new location of hiddenapi config files" am: 5bdc83c20a am: 327f943a36
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664025

Change-Id: I2549952a328411d0a1c70c80a5e3d3419d3ff2b5
2021-04-07 16:37:31 +00:00
Paul Duffin
5bdc83c20a Merge "Update build to new location of hiddenapi config files" 2021-04-07 15:52:06 +00:00
Anton Hansson
08f476bf83 Fix bug in sdk_library string matching
- The public stubs were being matched against the string ".stubs.public"
  which was never the suffix that these stubs used
- Remove obsolete naming pattern matching

Test: m
Change-Id: I1f7bd54e4629f42e34fb3c09828d8853813ba2a7
2021-04-07 15:39:58 +01:00
Paul Duffin
c81171aeda Merge "Remove hidden API special handling of android.test.base" am: 4896da1444 am: bd8ceee02b am: d9749fc553
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665745

Change-Id: Ie56660598421ddee8cdf93742b52b7b861a7029a
2021-04-07 14:13:48 +00:00
Paul Duffin
d9749fc553 Merge "Remove hidden API special handling of android.test.base" am: 4896da1444 am: bd8ceee02b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665745

Change-Id: Ica9417c42d2c597872e133410de007f7f1f33478
2021-04-07 13:25:48 +00:00
Paul Duffin
4896da1444 Merge "Remove hidden API special handling of android.test.base" 2021-04-07 12:27:16 +00:00
Pedro Loureiro
d5178c7604 Merge "Update soong for new lint version" am: 9537d594ce am: 50023a5a40 am: 522dab8b8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664033

Change-Id: I6eb7937e02dc33d774d426e4ff8f0ee809dd9d08
2021-04-07 11:04:59 +00:00
Paul Duffin
79a8744fd1 Merge changes I45274836,I47268b81 am: de21202bd2 am: 6c9d9bd3b1 am: 73057c5172
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665746

Change-Id: Ia624d9bc94179df6c7c9d27901901d7764d9f7c5
2021-04-07 11:04:50 +00:00
Pedro Loureiro
522dab8b8f Merge "Update soong for new lint version" am: 9537d594ce am: 50023a5a40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664033

Change-Id: I6136fe27fb141dc2816809c43a6b122c49f024ba
2021-04-07 10:18:30 +00:00
Paul Duffin
73057c5172 Merge changes I45274836,I47268b81 am: de21202bd2 am: 6c9d9bd3b1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665746

Change-Id: I54195a9d8abc4fc7b835ea89f20e7e9e643ddb2c
2021-04-07 10:18:19 +00:00
Pedro Loureiro
9537d594ce Merge "Update soong for new lint version" 2021-04-07 09:30:06 +00:00
Paul Duffin
b5933f64e4 Remove hidden API special handling of android.test.base
The android.test.base module should never be on the bootclasspath.

Bug: 184331423
Test: m droid
Change-Id: Ibb963b4ce2d915d0205fb1b5a7ca9159a5c99b3f
2021-04-07 10:06:31 +01:00
Paul Duffin
de21202bd2 Merge changes I45274836,I47268b81
* changes:
  Add PrebuiltNameFromSource
  Add IsModulePreferred
2021-04-07 09:04:18 +00:00
Treehugger Robot
47ded52960 Merge "Make lint HTML output deterministic" am: 27d220662f am: 49f37cda8a am: a93181a2a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665060

Change-Id: I35657730102d84c178a7f1792a2070ddd3023fcb
2021-04-07 01:19:43 +00:00
Treehugger Robot
a93181a2a6 Merge "Make lint HTML output deterministic" am: 27d220662f am: 49f37cda8a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665060

Change-Id: I654594507b7d26e8ef357c78b149fbe3bd606233
2021-04-07 00:32:15 +00:00
Treehugger Robot
27d220662f Merge "Make lint HTML output deterministic" 2021-04-06 23:14:10 +00:00
Paul Duffin
864116ce3f Add PrebuiltNameFromSource
Bug: 177892522
Test: m nothing
Change-Id: I45274836d59adbd6b2a2a848705b189398f1e766
2021-04-06 21:20:58 +01:00
Paul Duffin
e1d3837645 Add IsModulePreferred
Bug: 177892522
Test: m nothing
Change-Id: I47268b81359d6fceb60e899a730b3b6034e09814
2021-04-06 21:18:34 +01:00
Treehugger Robot
76e7452f48 Merge "Set the usesNonSdk manifest attribute whan targeting module SDKs." am: 4238c5fe07 am: c952e7fad6 am: 855b5768cc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1657320

Change-Id: I4b500f3da2e6c39832ae4c93de6b4eb8667096d7
2021-04-06 19:55:03 +00:00
Treehugger Robot
855b5768cc Merge "Set the usesNonSdk manifest attribute whan targeting module SDKs." am: 4238c5fe07 am: c952e7fad6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1657320

Change-Id: Id9f34cbaf176160d68b31bf63e92c5144ecefea9
2021-04-06 19:29:20 +00:00
Treehugger Robot
4238c5fe07 Merge "Set the usesNonSdk manifest attribute whan targeting module SDKs." 2021-04-06 18:25:12 +00:00
Pedro Loureiro
70acc3dc0c Update soong for new lint version
Test: m nothing
Change-Id: Iaa9d37ef73f1fef5f2dbb8a840e774bb86c65bf7
2021-04-06 17:49:19 +00:00
Paul Duffin
aa73ae5b59 Update build to new location of hiddenapi config files
Bug: 179354495
Test: m nothing
Change-Id: I563237d46f35ae1d2b99ffaa93f77dfcef5a2b6e
2021-04-06 13:08:26 +01:00
Treehugger Robot
dd62393313 Merge changes Id33bf640,I4d67b9b9 am: 8c56183fb7 am: b17e061ae9 am: a7fe23c458
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663139

Change-Id: Ic1434fc150e802f3a6e8b58a9a6f3e16e93da146
2021-04-06 05:29:49 +00:00
Treehugger Robot
a7fe23c458 Merge changes Id33bf640,I4d67b9b9 am: 8c56183fb7 am: b17e061ae9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663139

Change-Id: I0128e2d5bf70a7cce8b16b78a62434c819b09de4
2021-04-06 04:42:35 +00:00
Treehugger Robot
8c56183fb7 Merge changes Id33bf640,I4d67b9b9
* changes:
  Don't use incorrect version names like VER or BOARD even in tests
  SdkSpec = Scope + ApiLevel
2021-04-06 03:18:16 +00:00
Colin Cross
ee4a8b7070 Make lint HTML output deterministic
Remove a date from the lint HTML output to make it deterministic.

Bug: 183509050
Test: m out/soong/.intermediates/packages/apps/DocumentsUI/DocumentsUI/android_common/lint/lint-report.html
Change-Id: I796c0b571780814b657b9427a17c248668053983
2021-04-05 18:38:05 -07:00
Colin Cross
713718317f Merge "Remove support for unsandboxed metalava" am: 7fef94f57b am: b60432e4c8 am: f9b5ed2b8e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660772

Change-Id: I8b624e1844d508121ad613110019d4478043657a
2021-04-06 01:33:50 +00:00
Colin Cross
f9b5ed2b8e Merge "Remove support for unsandboxed metalava" am: 7fef94f57b am: b60432e4c8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660772

Change-Id: I414edb7808f35e5db56edf6d1b0693cfe288b33d
2021-04-06 00:42:50 +00:00