Commit Graph

57028 Commits

Author SHA1 Message Date
Sam Delmerico
f15716ffab add jacocoagent by default to Java modules
On coverage builds, R8 will fail to properly optimize and fail the build
if ignore_warnings: false, because jacoco injects dependencies on
jacocoagent classes, but the jacocoagent library is not part of the
classpath libraries passed in to R8 in its arguments.

Instead we can add jacocoagent as a libs dependency for these modules so
that it will get pulled into the r8 flags.

Bug: 243903417
Test: cherry-pick ag/19866767 &&
  make SKIP_ABI_CHECKS=true PRODUCT=cf_x86_phone-userdebug
  EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true
  CLANG_COVERAGE=true COVERAGE_PATHS=""
  TARGET_USERDATAIMAGE_PARTITION_SIZE=17179869184
  SKIP_BOOT_JARS_CHECK=true service-uwb
Change-Id: Icc24cc260b896fc800125a0318308d823ccf7a83
(cherry picked from commit 1e3f78f866)
Merged-In: Icc24cc260b896fc800125a0318308d823ccf7a83
2022-09-12 13:59:18 +00:00
William Escande
72da93e188 Bluetooth available hack
The first hack has been introduced to facilitate the creation of the
com.android.btservices apex without the need to upload 100+ cl close to
the release date.
We now want to delete com.android.bluetooth apex and replace all the
apex_available rules to target the new apex name
It will be way much easier to do this in separate CL and without forcing
us into a single topic.

Bug: 243054261
Bug: 245214856
Test: Build
Change-Id: Ia03698db839db4684871eb38c088f88d6bdcba4b
(cherry picked from commit 2ad6e84d60)
Merged-In: Ia03698db839db4684871eb38c088f88d6bdcba4b
2022-09-06 18:15:16 +00:00
Sam Delmerico
cfd0caaf78 jacoco libs dependency for instrumented libraries
On coverage builds, R8 will fail to properly optimize and fail the build
if ignore_warnings: false, because jacoco injects dependencies on
jacocoagent classes, but the jacocoagent library is not part of the
classpath libraries passed in to R8 in its arguments.

Instead we can add jacocoagent as a libs dependency for these modules so
that it will get pulled into the r8 flags.

Bug: 243903417
Test: add optimize.ignore_warnings: false to NetworkStackAppDefaults &&
  make SKIP_ABI_CHECKS=true PRODUCT=cf_x86_phone-userdebug \
  EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true \
  CLANG_COVERAGE=true COVERAGE_PATHS="" \
  TARGET_USERDATAIMAGE_PARTITION_SIZE=17179869184 \
  SKIP_BOOT_JARS_CHECK=true \
  NetworkStack
Change-Id: I71313b1fd35437ec52890f5c30b3fd1381c7c3d2
(cherry picked from commit c75937264b)
Merged-In: I71313b1fd35437ec52890f5c30b3fd1381c7c3d2
2022-09-05 04:20:55 +00:00
Paul Duffin
4eed981670 Add current build release
Previously, the build releases only included named releases so did not
have a way to represent the latest build release. This adds the current
build release (named after the current API level) to represent that.

Bug: 240406019
Test: m nothing
Change-Id: Ib8336da716b447448b23bc9684ce3be1ab78648a
(cherry picked from commit 42a49f1278)
Merged-In: Ib8336da716b447448b23bc9684ce3be1ab78648a
2022-08-21 12:18:12 +00:00
Paul Duffin
b5e3c9802a Add hidden API properties to java_sdk_library modules
Previously, hidden API properties were only allowed on
bootclasspath_fragment and platform_bootclasspath module types. This
change allows them to be specified on java_sdk_library modules too. It
involves the following changes:

1. Add the properties to the java.Module.
2. Populate and provide a HiddenAPIPropertyInfo struct from
   java_sdk_library modules.
3. Modify bootclasspath_fragment to merge information gathered from its
   content libraries as if it was specified on the fragment itself.

Bug: 240406019
Test: m nothing
      packages/modules/common/build/mainline_modules_sdks.sh
      # Ran the previous command with and without this change to make
      # sure that this change does not change the sdk snapshot
      # contents.
Change-Id: I64eb71c2039ddc14cf380689d0cec7ec221f5b88
(cherry picked from commit 3f1ae0b55a)
Merged-In: I64eb71c2039ddc14cf380689d0cec7ec221f5b88
2022-08-21 12:18:06 +00:00
TreeHugger Robot
067e12f46a Merge "Dedup apiFile and removedApiFile fields" into tm-mainline-prod 2022-08-19 17:31:31 +00:00
Paul Duffin
6cdfd3fcfb Dedup apiFile and removedApiFile fields
Previously, there were two separate fields for each of the API and
removed API files because in some cases it needed a WritablePath and in
other cases it could only be a Path.

This change refactors the code so that the WritablePath is no longer
needed, the duplicate fields deleted and the remaining field is changed
to Path. It also removes a few unused fields.

Bug: 234113632
Test: m nothing
Change-Id: If81f5fe2aa05d9d7b2bc23869fdb2397649d67b3
(cherry picked from commit c71d2b7629)
Merged-In: If81f5fe2aa05d9d7b2bc23869fdb2397649d67b3
2022-08-19 15:26:33 +00:00
Paul Duffin
04beaabb46 Push Hidden_api inside HiddenAPIFlagFileProperties
All usages of HiddenAPIFlagFileProperties use it as the type of a
Hidden_api field. This change pushes the field inside the struct and
just embeds the struct inside the structs that need it making it
simpler and more consistent with how the HiddenApiPackageProperties
struct is used.

This is extracted as a separate change as while the change is simple
it does affect a lot of lines. Keeping it separate makes it easier to
review the changes.

Bug: 240406019
Test: packages/modules/common/build/mainline_modules_sdks.sh
      # Ran the previous command with and without this change to make
      # sure that this change does not change the sdk snapshot
      # contents.
Change-Id: I664453029574ef68dc5712f7bf137a1a6e78e864
(cherry picked from commit 9b61abbd84)
Merged-In: I664453029574ef68dc5712f7bf137a1a6e78e864
2022-08-19 15:19:32 +00:00
Paul Duffin
710a9edf21 Refactor handling of hidden API property provided information
In preparation for adding hidden API properties to individual
java_sdk_library modules this change refactors the handling of that
information.

1. Renames HiddenApiPackageProperties to HiddenAPIPackageProperties
   to be consistent with other similar structs.

2. Creates a new HiddenAPIPropertyInfo struct to be used to provide
   property derived information from one module to another. It includes
   both flag files as well as the information about which packages are
   used.

3. The HiddenAPIPropertyInfo is embedded within the existing
   HiddenAPIFlagInput in place of the existing flag files field.

4. The fields in the HiddenAPIPropertyInfo struct are populated from
   the HiddenAPI*Properties structs.

5. Access to package information is retrieved from the info struct
   instead of directly from the properties. That means that no changes
   will be needed to this code when info from other modules is merged
   into the struct in a follow up change.

Bug: 240406019
Test: packages/modules/common/build/mainline_modules_sdks.sh
      # Ran the previous command with and without this change to make
      # sure that this change does not change the sdk snapshot
      # contents.
Change-Id: I773279a4b621bcc3c40e3bfe193f2c7b0caeccd6
(cherry picked from commit 1e9e9388d8)
Merged-In: I773279a4b621bcc3c40e3bfe193f2c7b0caeccd6
2022-08-19 15:19:26 +00:00
Paul Duffin
719cc628ce Revert "Check that API is up-to-date when building java_sdk_library"
This reverts commit c166b68589.

Bug: 234113632
Bug: 236187167
Reason for revert: causes problems with update-api, see b/236187167

Change-Id: I4c88151cb5e2c86bb6c1a955c5065966a4fbb3e0
(cherry picked from commit e7a8664a6a)
Merged-In: I4c88151cb5e2c86bb6c1a955c5065966a4fbb3e0
2022-08-17 09:19:32 +00:00
Ante Culo
8bfefc0e75 Merge "rust: Allow rust_ffi_shared in jni_libs" into tm-mainline-prod 2022-08-16 21:38:55 +00:00
Ivan Lozano
be6873f813 rust: Allow rust_ffi_shared in jni_libs
Allow listing rust_ffi_shared modules as a jni_libs dependency
in conjunction with platform_api: true. This allows inclusion by
android_app modules.

Bug: 237304791
Test: android_app module builds with a rust_ffi_shared dependency.
Change-Id: I3a28e1baa522ad8f9c2aa86f1d23b19ce9f967e1
Merged-In: I3a28e1baa522ad8f9c2aa86f1d23b19ce9f967e1
2022-08-16 19:46:25 +00:00
Artur Satayev
79b1f25dc2 Merge "Set targetSdkVersion to 10000 for MTS tests targeting current" into tm-mainline-prod 2022-08-08 08:57:04 +00:00
Spandan Das
cf9b0070c0 Set targetSdkVersion to 10000 for MTS tests targeting current
MTS tests built on unstable branches (e.g. git_master) should be testable on
old system images (e.g. S). However, they run into an error during installation
on older images:
`Requires development platform $<current_codename>, but this is a
release platform`

This CL fixes this issue by updating the target_sdk_version of MTS test apps
targeting current to the magical sdk_version 10000

Bug: 227473065
Test: go build ./java
Test: TH
Change-Id: Ic0358a48a19dc239defbb4ee8ec99225cce75584
Merged-In: Ic0358a48a19dc239defbb4ee8ec99225cce75584
2022-08-07 20:11:18 +00:00
Remi NGUYEN VAN
4987e7e397 Make ignorewarnings optional in optimize
This allows targets to opt-in to running R8 without the -ignorewarnings
flag. Ignored warnings can cause code to be optimized incorrectly, so
this makes the build safer for such targets.

Ideally ignore_warnings should default to false, but all targets need to
be fixed for that to happen. As a first step, provide a mechanism for
individual targets to ensure they do not introduce regressions.

Bug: 229727645
Bug: 180878971
Bug: 226127213
Bug: 239990030
Test: m (runs dex_test)
Change-Id: Ic0eef29598c1ee47e958da8a5048d9696165a235
(cherry picked from commit bdad314f97)
Merged-In: Ic0eef29598c1ee47e958da8a5048d9696165a235
2022-08-05 01:27:10 +00:00
Bob Badour
c4d437c6bf Keep Notice property from erasing license texts.
Remove "default to file in directory". Use explicit applicable license.

Bug: 192434786
Bug: 240342946

Test: m droid dist

Change-Id: Id3d845b2073f151a8c0bad874e7ab005771bdfcb
Merged-in: Id3d845b2073f151a8c0bad874e7ab005771bdfcb
2022-08-03 21:51:19 +00:00
Bob Badour
c2b6dec6d1 Fix escaping for package_name
Bug: 235333302
Bug: 240342946

Test: m droid dist

Change-Id: I6e52b960be4171a9510edd4f2857f13cc3f54bc0
Merged-in: I6e52b960be4171a9510edd4f2857f13cc3f54bc0
2022-08-03 14:02:39 -07:00
Bob Badour
877d5ee596 Tool to create license metadata for copied target.
Bug: 213388645
Bug: 240342946

Test: m copy_license_metadata
Test: m cts dist reportmissinglicenses

Change-Id: I75c196ceca221effb2d6c972e250f5d42854e42f
Merged-in: I75c196ceca221effb2d6c972e250f5d42854e42f
2022-08-03 14:02:37 -07:00
Bob Badour
65ebcd772e Make sure dist files have license metadata.
Bug: 151177513
Bug: 210912771
Bug: 240342946

Test: m droid dist reportmissinglicenses

Change-Id: I0c85f6c49a3e9d9bb3219ed6ddfb939d90f80656
Merged-in: I0c85f6c49a3e9d9bb3219ed6ddfb939d90f80656
2022-08-03 14:02:35 -07:00
Bob Badour
919855091c Add gen_notice module.
Refactor notices to support notices for multiple modules.

Enforce visibility and handle missing dependencies.

Test: m cts dist reportmissinglicenses

Test: m droid dist

Bug: 213388645
Bug: 240342946

Change-Id: Id6a81987f087419ad37d0cce57a71e8a7c4cd6e0
Merged-in: Id6a81987f087419ad37d0cce57a71e8a7c4cd6e0
Merged-in: I07963c83eaddfe363a04871e813b56fe7f1465ad
Merged-in: Ib2f8d0ad46ffe795d392166a74a7c6309b1246e2
Merged-in: I1d630c3d14d27b7605ab13d204d34b6851a24d33
2022-08-03 14:02:33 -07:00
Paul Duffin
9bcfe69743 Revert "Patch to fix Aug train issue with tethering"
Revert "[automerge] Patch to fix Aug train issue with tethering ..."

Revert submission 19432194-presubmit-am-5e598b33be884d9f98a29ce1c3c575fb

Reason for revert: Not needed in tm-mainline-prod and breaks bluetooth.
Reverted Changes:
I57969b85a:Patch to fix Aug train issue with tethering
Ie6560f201:[automerge] Patch to fix Aug train issue with teth...

Change-Id: If44d16a00847a554862aa139c04370ad30166c74
2022-07-28 10:07:30 +00:00
Paul Duffin
a649ad5b31 Patch to fix Aug train issue with tethering
A temporary patch to fix issues with the tethering module sdk in the
August train. This will be reverted immediately and only used for
specific builds for the August train and possibly the September train
if this has not been fixed properly by then. The proper fix will be
implemented under b/238472881.

This patch removes framework-tethering-t from the snapshot's Android.bp
file and removes its effect on the hidden API flag files too.

Bug: 238472881
Test: build train
Change-Id: I57969b85a12e9e5a3fc76c055b260cec5d5f7d7f
2022-07-28 09:31:28 +00:00
Paul Duffin
f33bea357e Export any platform_compat_config used by apex to sdk snapshot
Previously, the platform_compat_config modules needed to be explicitly
listed in the sdk snapshot and the apex. This change will automatically
export them to the sdk snapshot when the apex is listed in its apexes
property.

Bug: 232401814
Test: m tethering-module-sdk
      # Before this change the generated snapshot did not contain the
      # platform_compat_config, after this change it did.
      m art-module-sdk
      # As that explicitly specifies the platform_compat_config in its
      # compat_configs property this change has no effect.
Change-Id: Ia854b9a52db2b1619fca41a387ce98d7f9f9efe9
(cherry picked from commit fcf79850d8)
Merged-In: Ia854b9a52db2b1619fca41a387ce98d7f9f9efe9
2022-07-21 10:41:38 +00:00
Paul Duffin
43d56de71a Sort files in sdk snapshot zip to ensure consistent behavior
The order of the files in the sdk snapshot was stable but depended on
how the sdk was built. If the snapshot was created directly then the
files have one order, if it was created by merging in files from other
zips then it has a different order.

This change ensures files are in alphabetical order no matter how the
snapshot zip is constructed.

Bug: 232401814
Test: m media-module-sdk
      # Check the contents of the following zips to ensure that they are sorted
      # after this change.
      # out/soong/.intermediates/packages/modules/Media/apex/media-module-sdk/common_os/media-module-sdk-current.unmerged.zip
      # out/soong/mainline-sdks/media-module-sdk-current.zip
Change-Id: Ie97e0119c07a1f34a2b1d3ea6895f0e76cd195a8
(cherry picked from commit 74f1dcd1ab)
Merged-In: Ie97e0119c07a1f34a2b1d3ea6895f0e76cd195a8
2022-07-19 09:28:56 +00:00
Paul Duffin
14910d7847 [automerger skipped] Use implementation jar for updatable-media in snapshot for S am: 8a61b59e17 -s ours
am skip reason: Merged-In Ib49484d00a60b4ed7f8268e04f9c10a3498edb56 with SHA-1 be75059999 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19290569

Change-Id: If723e19d906332e2cb4a81e0167ddd4b9227ebec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 15:34:05 +00:00
Paul Duffin
8a61b59e17 Use implementation jar for updatable-media in snapshot for S
While enabling prebuilts in T we hit b/229932396 which was caused by
some parts of the build depending on the prebuilt updatable-media jar
which used to be a full implementation jar but which is now an invalid
jar as the snapshot must not be including implementation details. We
fixed the issue in T but we are hitting the same problem in S with the
M-2022-07.

That is the first train in which the prebuilt updatable-media module
provides an invalid jar, prior to that it was always providing an
implementation jar. This change tweaks the sdk snapshot generation
code to use an implementation jar for updatable-media in the S
snapshot to avoid partners having to cherry pick changes similar to
those needed to fix b/229932396 in T.

Bug: 239121291
Test: packages/modules/common/build/mainline_modules_sdks.sh
      # Check that S media snapshot includes implementation jar.
      # Check that S art snapshot includes invalid jar.
      # Check that T media snapshot includes invalid jar.
Change-Id: Ib49484d00a60b4ed7f8268e04f9c10a3498edb56
(cherry picked from commit 1364891fad)
Merged-In: Ib49484d00a60b4ed7f8268e04f9c10a3498edb56
2022-07-16 00:05:58 +00:00
Paul Duffin
be75059999 Use implementation jar for updatable-media in snapshot for S
While enabling prebuilts in T we hit b/229932396 which was caused by
some parts of the build depending on the prebuilt updatable-media jar
which used to be a full implementation jar but which is now an invalid
jar as the snapshot must not be including implementation details. We
fixed the issue in T but we are hitting the same problem in S with the
M-2022-07.

That is the first train in which the prebuilt updatable-media module
provides an invalid jar, prior to that it was always providing an
implementation jar. This change tweaks the sdk snapshot generation
code to use an implementation jar for updatable-media in the S
snapshot to avoid partners having to cherry pick changes similar to
those needed to fix b/229932396 in T.

Bug: 239121291
Test: packages/modules/common/build/mainline_modules_sdks.sh
      # Check that S media snapshot includes implementation jar.
      # Check that S art snapshot includes invalid jar.
      # Check that T media snapshot includes invalid jar.
Change-Id: Ib49484d00a60b4ed7f8268e04f9c10a3498edb56
(cherry picked from commit 1364891fad)
Merged-In: Ib49484d00a60b4ed7f8268e04f9c10a3498edb56
2022-07-15 22:34:28 +00:00
Alexei Nicoara
a3096cd6c1 Cleaning up comment removal and version replacement
jsonmodify is now responsible for striping the comments and replacing the placeholder  version with the defaule one. Cleaning up the old code.

Test: presubmit
Bug: 231691643
Change-Id: I09af00199aefec09b2d5995b2923525a3a42c362
(cherry picked from commit 0a3892031e)
Merged-In: I09af00199aefec09b2d5995b2923525a3a42c362
2022-07-13 16:14:32 +00:00
Wei Li
e26ebc8675 JSON format doesn't support comments, so a JSONWithCommentsDecoder is added to support line comments start with // that used in apex_manifest.json files. This fixes the CI errors reported in b/238399517.
Bug: 238399517
Test: build/bazel/ci/bp2build.sh
Change-Id: Iaa3c2ab319eb7a52cbedaddd057646fc089d745a
(cherry picked from commit 18b7a2e8a2)
Merged-In: Iaa3c2ab319eb7a52cbedaddd057646fc089d745a
2022-07-13 13:39:12 +00:00
Alexei Nicoara
8396d07202 Merge changes from topic "cherrypicker-L32800000955443217:N86800001279016908" into tm-mainline-prod
* changes:
  Cleaning up the version sed rule
  Adding support to conditionally replace a value
2022-07-13 09:22:01 +00:00
TreeHugger Robot
f285e54c6f Merge changes from topic "cherrypicker-L07900000955432058:N23200001279006695" into tm-mainline-prod
* changes:
  bootclasspath_fragment: Require at least one hidden_api package property
  bootclasspath_fragment: Treat some specific modules as test
  bootclasspath_fragment: Add test specific module type
2022-07-12 14:25:54 +00:00
Alexei Nicoara
ceefda1312 Cleaning up the version sed rule
Bug: 231691643
Test: presubmit, checked itermediary jsons
Change-Id: Ibcf908d9365ab41e5a19211f5a60305a0896dea5
(cherry picked from commit d887e24260)
Merged-In: Ibcf908d9365ab41e5a19211f5a60305a0896dea5
2022-07-12 13:53:24 +00:00
Alexei Nicoara
221f5734aa Adding support to conditionally replace a value
Bug: 231691643
Test: presubmit
Change-Id: I786ab152a94126ebc8a9d7dea0bb68e07d789a0b
(cherry picked from commit 7d69b1d8e6)
Merged-In: I786ab152a94126ebc8a9d7dea0bb68e07d789a0b
2022-07-12 13:53:21 +00:00
Paul Duffin
3532c556ed bootclasspath_fragment: Require at least one hidden_api package property
Previously, the split_packages, single_packages and package_prefixes
properties were all optional and the split_packages defaulted to ["*"].
As that value conflicted with the other package properties that meant
that split_packages always had to be specified even if it was to just
set it to an empty array.

This change requires at least one of them to be specified and defaults
split_packages to an empty list which means it is not required,
although it can be helpful to make that explicit.

Bug: 194063708
Test: m nothing
Change-Id: I5a4c2d68e72e39f5c4a2441326dfce8685fc8ff2
(cherry picked from commit 9fd564711e)
Merged-In: I5a4c2d68e72e39f5c4a2441326dfce8685fc8ff2
2022-07-12 12:01:02 +00:00
Paul Duffin
e2c7fd9b8c bootclasspath_fragment: Treat some specific modules as test
Treats bootclasspath_fragment modules that have not yet been converted
to test modules as if they were test modules. This is a temporary work
around to ease the migration to bootclasspath_fragment_test modules and
is expected to be reverted.

Bug: 194063708
Test: m nothing
Change-Id: I093fbec4e926719b644c64ebfc63f9e3070e28db
(cherry picked from commit ff9b6faba2)
Merged-In: I093fbec4e926719b644c64ebfc63f9e3070e28db
2022-07-12 12:01:00 +00:00
Paul Duffin
ab9fbab7ef bootclasspath_fragment: Add test specific module type
This is needed to allow the behavior of the bootclasspath_fragment to
be tweaked for test fragments.

Bug: 194063708
Test: m nothing
Change-Id: Iee5c09d5b580d088ba081d95a788dbde883078ed
(cherry picked from commit c15b9e99e5)
Merged-In: Iee5c09d5b580d088ba081d95a788dbde883078ed
2022-07-12 12:00:58 +00:00
Alexei Nicoara
68a7a2b333 Replace version 0 with the default version
Having 0 as the default version causes problems in flattened apexes and
is being parsed in protobuf as non-existing field. It will be hard to
revert 100 of commits for all the modules. Changing the version in soong
to mitigate time impact.

Test: presubmit, checked .intermediary jsons
Bug: 231691643
Change-Id: I451186d79fd9f8345fd4e28d9daadbfc59047445
(cherry picked from commit e922d2139d)
Merged-In: I451186d79fd9f8345fd4e28d9daadbfc59047445
2022-07-12 10:37:13 +00:00
Paul Duffin
2bf4389d33 Add apexes property to sdk
Specifying an apex in the apexes propety will cause all the
*classpath_fragments that are contents of the APEX to be automatically
added as members of the sdk and appear in the snapshot.

The purpose of this change is to dedup the APEX and sdk definitions and
try and avoid some of the issues that we have been finding while
attempting to build against the prebuilts.

Two tests, one each for bootclasspath_fragment and
systemserverclasspath_fragment, have been refactored to compare the
output when adding the *fragment to the sdk directly of via the APEX.
That ensures switching to use the APEX will not change the sdk snapshot
unless it was previously missing a *fragment.

There was also a slight difference in where the hidden API flags were
copied from. That should have no impact on the output as the flags are
identical.

The sdk snapshot generation needed some tweaks to avoid generating a
prebuilt for the APEX.

Bug: 232401814
Test: m nothing
Merged-In: I7aaf16a3a0ab4bebf97765d1484215cc008dc4b8
Change-Id: I7aaf16a3a0ab4bebf97765d1484215cc008dc4b8
(cherry picked from commit 4e7d1c43e2)
2022-07-11 21:17:19 +00:00
Paul Duffin
42cdd62d91 Remove support for generating versioned snapshots
(cherry picked from commit b01ac4b6ba)

Previously, the code for selecting specific versions of sdk snapshots
was removed (along with the uses_sdks property). That makes versioned
snapshots useless so this change removes all the code and tests that
generated those versioned snapshots.

Bug: 232546567
Test: m nothing
      packages/modules/common/build/mainline_modules_sdks.sh
Change-Id: Ib6d1b72bc8399fbb39075494ae37da92f4b28d03
Merged-In: Ib6d1b72bc8399fbb39075494ae37da92f4b28d03
2022-07-11 21:17:19 +00:00
TreeHugger Robot
68e7206340 Merge "Pass pointer to dependencyTag instead of copying struct" into tm-mainline-prod 2022-07-11 19:58:53 +00:00
Paul Duffin
e4713a88cb Pass pointer to dependencyTag instead of copying struct
A follow up change will add some more fields to the tag which will make
passing the struct around by value will get more expensive. Switching
to pointers will make this slightly more efficient.

Changing the type of the tags from dependencyTag to *dependencyTag
broke a test. Rather than simply patch the test and then maybe have to
patch it again in the next change this adds a a String() method that
will insulate the test from being affected by changes in the
dependencyTag contents.

Bug: 232401814
Test: m nothing
Change-Id: I23da742ebffb74ef3b9b68f772519ceb38332f5f
(cherry picked from commit 520917af9d)
Merged-In: I23da742ebffb74ef3b9b68f772519ceb38332f5f
2022-07-11 17:36:50 +00:00
Liz Kammer
7b71083e35 Handle multiple linkages in sdk snapshots
Currently, if the same library is specified for multiple of native_libs,
native_shared_libs, and native_static_libs for different arch/oses,
there can be a few errors:

1. specifying a .so file as `srcs` within a cc_prebuilt_library rather
than being specified only for shared
2. the final type of prebuilt library is dependent on the arch/os

This change introduces:
* an ability for a member type to override the type for specified
  properties
  * checks for a library being used with incompatible member types
  * basing linkage nesting on the member type in addition to variants

  This will ensure that the correct library type is used, regardless of
  the order of iteration over oses/arches, and support nesting linkages
  where necessary but only one linkage variant exists.

Test: soong tests
Test: CI
Change-Id: I81dee013b09b99c34ca6c18f9cfcc12ee56d33d1
(cherry picked from commit 96320dfff8)
Merged-In: I81dee013b09b99c34ca6c18f9cfcc12ee56d33d1
2022-07-11 17:21:40 +00:00
Lukacs T. Berki
537b550ee3 Remove memberInterVersionMutator.
paulduffin@ says it's not necessary anymore.

Test: Presubmits.
Bug: 232546567
Change-Id: I6ac69fbdc7a202ac54f250ea6cde0ea99d75864c
(cherry picked from commit ab392edc47)
Merged-In: I6ac69fbdc7a202ac54f250ea6cde0ea99d75864c
2022-07-11 17:21:37 +00:00
Paul Duffin
09bb15da5e Merge "Stop exporting systemserverclasspath_fragment when targeting S" into tm-dev am: 0147aca453
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19135262

Change-Id: I9039499819e938deb9d13557bdee26fc56bd6f4c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 17:21:58 +00:00
Paul Duffin
0147aca453 Merge "Stop exporting systemserverclasspath_fragment when targeting S" into tm-dev 2022-07-07 17:03:51 +00:00
Alexei Nicoara
d4ba42e01c Passing default version to zipApex as well
Test: presubmit
Bug: 231691643
Change-Id: Ic751d7ea2d23180855897702a03bf1b589d7ef80
(cherry picked from commit c939b0181d)
Merged-In: Ic751d7ea2d23180855897702a03bf1b589d7ef80
2022-07-07 08:44:00 +00:00
Kousik Kumar
224384434e [automerger skipped] [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 040867f3b8 -s ours am: 33cc93f02f -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19135647

Change-Id: I06eae35177dbe0fcc04c85e9360d440284855219
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 21:35:15 +00:00
Kousik Kumar
33cc93f02f [automerger skipped] [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 040867f3b8 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19135647

Change-Id: I662d4c403ec76097fafa6b4be2fe89dcb3ac7f8a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 21:16:51 +00:00
Paul Duffin
b0c28d63d6 Stop exporting systemserverclasspath_fragment when targeting S
Previously, when targeting the S release the generated sdk snapshot
would contain prebuilt_systemserverclasspath_fragment modules even
though they were only added in T.

This allows SdkMemberTypes to specify the set of target build releases
they support and ignores them when targeting an unsupported target
build release.

The Merged-In value was chosen to prevent this from being merged into
branches where it will conflict due to https://r.android.com/2105804.
That will allow this change to be submitted in tm-dev before it is
submitted in AOSP.

Test: m nothing
      packages/modules/common/build/mainline_modules_sdks.sh
      # Check that the for-S-build snapshots do not include SSCPFs.
Bug: 237718221
Change-Id: I2df08c2fcebf9b866695d691572a9d3783758b17
Merged-In: Ib6d1b72bc8399fbb39075494ae37da92f4b28d03
2022-07-05 14:48:09 +00:00
Alexei Nicoara
75bc7c8521 Merge "Removing comment lines from apex_manifest.json" into tm-mainline-prod 2022-07-05 12:38:58 +00:00