Commit Graph

56554 Commits

Author SHA1 Message Date
Yurii Zubrytskyi
2c268407dc Merge "build/soong - support the REL platform version in classpath" into tm-dev 2022-05-07 15:11:19 +00:00
Yurii Zubrytskyi
3cdd35199d Revert "Hacky workaround for half-finalized builds."
This reverts commit 50493f0797.

Reason for revert: build is now fully finalized

Change-Id: Iaa5b9d84b84303a8b8baf30641d861a035169f48
2022-05-06 16:10:04 +00:00
Yurii Zubrytskyi
1611334fa2 build/soong - support the REL platform version in classpath
Make sure we select the proper API level number for the REL
platform version when generating the classpath protos

Bug: 231272086
Test: build + boot emulator
Change-Id: Ib3b711dc05dd6136a68e6de414d806687a849bc9
2022-05-06 16:09:52 +00:00
Artur Satayev
9f2bcac707 Add support to max-target-s to generate_hiddenapi_lists
Test: make
Bug: 169748350
Change-Id: I2662a643a190ed531d85755d01e1be9c49c02e25
Merged-In: I2662a643a190ed531d85755d01e1be9c49c02e25
2022-05-06 08:58:24 +00:00
Colin Cross
dddb402c02 Add missing dependency on compose plugin in kapt rules
The kapt rule uses kotlincFlags but was not using kotlincDeps,
causing the rule to get the -Xplugin argument on the compose
compiler plugin jar, but not have a dependency on it.

Bug: 231222079
Test: TestKotlinCompose
Change-Id: I4c2cf30fb7d8cad4eededa29f67f4ffd459caa41
(cherry picked from commit 08b0a1cd79)
Merged-In: I4c2cf30fb7d8cad4eededa29f67f4ffd459caa41
2022-05-03 17:07:27 +00:00
Paul Duffin
fe45ae8feb Merge "Prevent non-app/non-test modules from statically including jacocoagent" into tm-dev 2022-05-03 10:07:55 +00:00
TreeHugger Robot
a83d03c206 Merge "Add buildinfo_prop module" into tm-dev 2022-05-03 05:14:30 +00:00
Paul Duffin
3953153c9e Prevent non-app/non-test modules from statically including jacocoagent
Previously, the .impl library of java_sdk_library modules would end up
with the jacocoagent statically included. That is because their
Instrument flag was set to true when created by their parent. As that
was before the deps were added that meant that they ended up with a
static dependency on jacoagent (at least when UnbundledBuild() was
true).

That was not previously a problem because the .impl files were only
used at build time. However, a recent change to make updatable-media
statically include framework-media.impl (which statically included the
jacocoagent classes) broke the coverage build because the jacocoagent
classes are not in the permitted packages for the updatable-media.

When instrumenting the bootclasspath the jacocoagent library is added
to the art-bootclasspath-fragment.

The jacocoagent should only be statically included in apps, or test
apps. This change adds an extra flag to specify whether the module type
supports statically including the jacocoagent. This is set to true by
apps and test apps but not when the java_sdk_library creates the .impl
java_library preventing it from statically including jacocoagent.

Bug: 230967146
Bug: 229932396
Test: COVERAGE_MODULES=media \
      PRODUCT=mainline_modules_x86 \
      TARGET_BUILD_APPS=com.google.android.media \
      vendor/google/build/build_unbundled_coverage_mainline_module.sh
      # Fails without this change, passes with it.
Change-Id: Ic95cf11a05f59b67e623474ed3dd9be6b4442c42
2022-05-03 00:46:55 +00:00
Yi Kong
b3089e8a20 Update clang version to clang-r450784d
Test: presubmit
Bug: 219872355
Change-Id: If6c2c331044a363cb8f20a2516da894e72c4b7e7
(cherry picked from commit 4f6c92765d)
Merged-In: If6c2c331044a363cb8f20a2516da894e72c4b7e7
2022-05-02 19:02:05 +00:00
Inseob Kim
c7c4746151 Add buildinfo_prop module
buildinfo_prop module is a replacement for build/make/tools/buildinfo.sh
so other images like microdroid can refer to build.prop.

For now, buildinfo_prop only supports a few build.prop properties, and
it's only used in microdroid.

Bug: 189164487
Test: build
Change-Id: I120654ca23a68de414df8da2051c6677afbab441
Merged-In: I120654ca23a68de414df8da2051c6677afbab441
(cherry picked from commit 4f1f3d97ca)
2022-05-02 09:51:45 +09:00
Spandan Das
2a42e55457 Disable newapi check in defaults
- Making newapi disabled by default will ensure that this lint check
  does not run on the platform. This prevents noisy lint warnings like b/228956345#1
- This lint check will continue to be enforced on the transitive deps of
  apexes, since lint.strict_updatability_linting will be true for those
  Soong modules

Test: TH
Test: m
out/soong/.intermediates/frameworks/base/services/core/services.core.unboosted/android_common/lint/lint-report.xml
// file no longer contains "Call requires API level ..." warning
Bug: 228956345

Merged-In: I8ef3137394011fb679a1129f80f6351fb05a4eff
Change-Id: I8ef3137394011fb679a1129f80f6351fb05a4eff
(cherry picked from commit 397e910835)
2022-04-29 17:36:07 +00:00
Spandan Das
a3264efb42 Enforce newapi check only if min_sdk_version < compile_sdk_version
- NewApi check should be enforced only if min_sdk_version is less than
  the compile_sdk_version (the opposite direction should be a different
  build-time error)
- Change the datatype of *sdkVersion to android.ApiLevel (from string)
  to support version comparisons

Test: go build ./java
Test: no changes in ninja file
Bug: 228956345

Merged-In: Ic408857db7760d912ef4694d2ed72c0b7106eb04
Change-Id: Ic408857db7760d912ef4694d2ed72c0b7106eb04
(cherry picked from commit ba7e532a11)
2022-04-29 17:35:51 +00:00
Paul Duffin
2b5384bc93 Merge "java_sdk_library_import: Delegate OutputFiles to impl library if needed" into tm-dev 2022-04-29 16:26:07 +00:00
Paul Duffin
a80cc174a2 hiddenapi: Prevent libraries for Q/R from include S+ flags.
The Q and R runtimes can handle Q/R flags but not S flags. So, this
change verifies that any library that can run on Q/R
(min_sdk_version <= R) by adding --max-hiddenapi-level=max-target-r
to the "hiddenapi encode" command. That will cause a failure if any
S+ flags are found in the flags to encode.

Bug: 172453495
Test: m droid && launch_cvd
      Cherry pick changes in https://r.android.com/q/topic:max-target-s
      Add @UnsupportedAppUsage maxTargetSdk=S in classes in framework-permission (for r/q)
      and framework-permission-s (nominally for S+). I had to incresed the min_sdk_version
      in the latter to 31 (S) as it was still set at 30 (R).
Merged-In: Ie0f68482603adc7b4e3d7a5c81bf203d81a84a9e
Change-Id: Ie0f68482603adc7b4e3d7a5c81bf203d81a84a9e
(cherry picked from commit 09817d66de)
2022-04-29 14:08:30 +00:00
Paul Duffin
3cf140fe98 java_sdk_library_import: Delegate OutputFiles to impl library if needed
Bug: 230846030
Test: m nothing
      # Cherry pick into build with prebuilts enabled to verify.
Merged-In: I5ac9b1cdd2fc61efbc988e84556202ff6cd57146
Change-Id: I5ac9b1cdd2fc61efbc988e84556202ff6cd57146
(cherry picked from commit 1e940d5b44)
2022-04-29 14:05:22 +00:00
Paul Duffin
a083ec4acf Allow framework-media to build the framework-media.impl
(cherry picked from commit 77590a8263)

The framework-media java_sdk_library is currently api_only for legacy
reasons. This change allows it to also build the framework-media.impl
library by making the following changes:
* Adds impl_only_static_libs to allow the implementation to statically
  include other libraries, something no other java_sdk_library has
  needed to do.
* Passes the apex_availability property through to the impl library so
  it can be statically included in the updatable-media which is what is
  included in the apex, again for legacy reasons.

Bug: 190807367
Bug: 229932396
Test: m com.android.media media-module-sdk
      # Compare before and after this change (and corresponding change
      # to updatable-media/framework-media.
Merged-In: I9e1837edcca6f5fa84fc611274cf8fbba8a896b8
Change-Id: I9e1837edcca6f5fa84fc611274cf8fbba8a896b8
2022-04-28 21:49:52 +00:00
Oriol Prieto Gasco
557e3fa4a6 Merge "Set the dist dir for musl targets of build_version_test" into tm-dev 2022-04-28 12:17:41 +00:00
TreeHugger Robot
8fc3fa09fa Merge "Bump minimum minSdkVersion to 19." into tm-dev 2022-04-27 22:05:18 +00:00
Yi Kong
b5abdaef42 Merge "Update to clang-r450784d" into tm-dev 2022-04-27 16:54:06 +00:00
Oriol Prieto Gasco
92e3e4fbf6 Set the dist dir for musl targets of build_version_test
Bug: 230604501
Test: build/soong/soong_ui.bash --make-mode apexer_tools static_apexer_tools dist BUILD_HOST_static=1 USE_HOST_MUSL=true
Change-Id: I29b7f4c16346e39b89f099eecf816d9811a7b587
2022-04-27 15:32:48 +00:00
Yi Kong
db7e0ceb2f Update to clang-r450784d
This respin contains performance improvements to clang-tidy and lld, and
fp16 cost fixes.

Test: presubmit
Bug: 219872481
Change-Id: I322a680cdc6ebc0f1fe3735ed087477e7f2508fe
(cherry picked from commit a126c63042)
Merged-In: I322a680cdc6ebc0f1fe3735ed087477e7f2508fe
2022-04-26 16:45:34 +00:00
Jingwen Chen
3b1dcf4f46 Append APEX version instead of build ID for APK-in-APEX paths.
This CL removes the build_id.mk suffix and replaces it with a hardcoded
placeholder string that will be replaced with the actual version in
apex_manifest.json by apexer at apex construction time.

This means that as long as the apex version is incremented, the
APK-in-APEX will be installed to a new directory path from the package
manager's perspective.

Fixes: 229574810
Bug: 229625490
Bug: 226559955
Bug: 224589412
Bug: 227417611
Bug: 228157333
Bug: 228803590
Bug: 229136249

Test: atest StrictJavaPackagesTest
Test: soong tests
Test: deapexer list out/dist/com.google.android.permission.apex
Ignore-AOSP-First: this is an cherrypick
Change-Id: I9cef1418c3fc7e0970d96995b8398f5e82f479e0
Merged-In: I9cef1418c3fc7e0970d96995b8398f5e82f479e0
2022-04-26 12:54:50 +00:00
Dan Albert
fa652e32a6 Bump minimum minSdkVersion to 19.
We need to land an update to the NDK prebuilts and the NDK no longer
supports APIs 16-18.

Bug: http://b/222341313
Test: treehugger
Change-Id: I996b0eb65a7d1ae4cc0687b7ed8f533fbbba295d
2022-04-25 23:17:23 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
562477b1c7 Merge changes from topic "b/215723302" am: 66e6466e0f am: 4ed4ace5d9 am: 3f8e0c4846
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2002753

Change-Id: I77a2f325a37001ef47e83687242e1642bc6a3fd6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 15:33:23 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
90bdb0b46a Abstract prebuilt_etc into prebuilt_file am: b81f77ed24 am: c0fa5fb34e am: 30136e83d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2002752

Change-Id: Ic7909cc9aa5d32c1eb4f9fb4e28b86885ce442df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 15:33:19 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
7f55284a9e DoNotConvert tzdata nor tz_version am: bff2e88a85 am: 9ea047d5e3 am: bf99c62ff5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2069572

Change-Id: I4e40f401a5f35e346ec45ed0093ec2f7aa1f349e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 15:33:16 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
3f8e0c4846 Merge changes from topic "b/215723302" am: 66e6466e0f am: 4ed4ace5d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2002753

Change-Id: I065c9ddbc5b27d2b5ed1fae998a776153de096f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 15:12:13 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
30136e83d5 Abstract prebuilt_etc into prebuilt_file am: b81f77ed24 am: c0fa5fb34e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2002752

Change-Id: Ie579a368a2b51f802250bce13cf3447e73b9eaf6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 15:12:09 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
bf99c62ff5 DoNotConvert tzdata nor tz_version am: bff2e88a85 am: 9ea047d5e3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2069572

Change-Id: I7ec3dcae1f326750945b87e74df6718e0defa23f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 15:12:06 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
4ed4ace5d9 Merge changes from topic "b/215723302" am: 66e6466e0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2002753

Change-Id: I3a2b3d7c2830f82bc578624b3a434058c956eaf2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 14:55:30 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
c0fa5fb34e Abstract prebuilt_etc into prebuilt_file am: b81f77ed24
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2002752

Change-Id: Ica34b683a4696e86feabe0a6fd7f0fd0561d906f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 14:55:26 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
9ea047d5e3 DoNotConvert tzdata nor tz_version am: bff2e88a85
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2069572

Change-Id: Ib46e17f36142a262e20463509926a00b32cc89b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 14:55:23 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
66e6466e0f Merge changes from topic "b/215723302"
* changes:
  Use prebuilt_file for prebuilt_{etc,usr_share}
  Abstract prebuilt_etc into prebuilt_file
2022-04-21 14:37:46 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
bff2e88a85 DoNotConvert tzdata nor tz_version
In using prebuilt_file for prebuilt_{etc,usr_share}, Bazel now sees such
targets translated and doesn't permit a target name to alias e.g. its
`src`. Thus we temporarily disable the conversion of the `tz_version` and
`tzdata` whilst their in-tree sources are updated. Their conversions
will be reenabled afterward.

Bug: 215723302
Test: bp2build.sh
Test: mixed_{libc,droid}.sh
Change-Id: Ie19813ccb0fb93c90b54bfd19c909ed15b826385
2022-04-21 14:37:12 +00:00
Jingwen Chen
7aa14bf929 [automerger skipped] Merge "Suffix the build ID to the dirname of APK-in-APEX files." am: 3a5be76dc0 am: 423fb97541 am: 22090e09fc -s ours
am skip reason: Merged-In I8af49d51ff99cf8184d0e4d1136fff1cdb29c23e with SHA-1 11cca671ac is already in history

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

Change-Id: If75731bbc507f58ca74f34c9938730a2a7b2952d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 10:37:25 +00:00
Jingwen Chen
22090e09fc Merge "Suffix the build ID to the dirname of APK-in-APEX files." am: 3a5be76dc0 am: 423fb97541
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2044863

Change-Id: If9832aeffe026d395486d1d5743baf657d2c4908
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 10:14:19 +00:00
Jingwen Chen
423fb97541 Merge "Suffix the build ID to the dirname of APK-in-APEX files." am: 3a5be76dc0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2044863

Change-Id: Ic42c6028c0612e77262fd7a1b48f75f9e92e184e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 09:48:45 +00:00
Jingwen Chen
3a5be76dc0 Merge "Suffix the build ID to the dirname of APK-in-APEX files." 2022-04-21 09:24:22 +00:00
Treehugger Robot
724b274d57 Merge "Recursively list Android image contents." am: fa8fce5542 am: 9b6a0a2bdd am: d103706b0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2049928

Change-Id: Ic969934a49168bcda268464fedf4ad652894053c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 07:22:17 +00:00
Treehugger Robot
d103706b0f Merge "Recursively list Android image contents." am: fa8fce5542 am: 9b6a0a2bdd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2049928

Change-Id: Iab8e382362bcfeee1f4af356863f5bfa59d748f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 06:58:58 +00:00
Treehugger Robot
9b6a0a2bdd Merge "Recursively list Android image contents." am: fa8fce5542
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2049928

Change-Id: I4893802128de3e1238ec9b46ce83fe30c2bf4d9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 06:40:19 +00:00
Treehugger Robot
fa8fce5542 Merge "Recursively list Android image contents." 2022-04-21 06:25:10 +00:00
Wei Li
4ade3f0ffb Merge "Put provenance_metadata.textproto in dist directory." am: 7023c80e19 am: 003edb878a am: 8a6bdf408a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2069478

Change-Id: I5b7e5841663d200b17ea20238b436db7ed9992b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 05:13:31 +00:00
Wei Li
8a6bdf408a Merge "Put provenance_metadata.textproto in dist directory." am: 7023c80e19 am: 003edb878a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2069478

Change-Id: If26ecbff446b48e89c40dcaf5b509a164e9065eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 04:59:17 +00:00
Wei Li
003edb878a Merge "Put provenance_metadata.textproto in dist directory." am: 7023c80e19
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2069478

Change-Id: Id5a6521b0e2fd27863ac5086b583208f243e8624
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 04:41:07 +00:00
Wei Li
7023c80e19 Merge "Put provenance_metadata.textproto in dist directory." 2022-04-21 04:04:41 +00:00
TreeHugger Robot
8b37609b71 Merge "Remove duplicate optional libs" into tm-dev 2022-04-21 03:27:11 +00:00
Sasha Smundak
fe11851029 Recursively list Android image contents.
Relies on debugfs utility to inspect image contents.
The output looks something like this:
```
./
./app/
./app/Calendar/
./app/Calendar/Calendar.apk
```

Test: manual
Change-Id: Ia05f4e857dfd28ac76ac2b450b08f5cf5577d21f
2022-04-20 20:02:11 -07:00
Wei Li
7cf80a65a8 Put provenance_metadata.textproto in dist directory.
Bug: 217434690
Test: m dist
Change-Id: I2f0d51846b3aad48c923c2f281ed42b6d4fe2a1d
2022-04-21 00:02:09 +00:00
Dan Albert
4451946baa Merge changes from topic "abigail-werror" am: e31a071389 am: 30cfbf22eb am: d0399047c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2065275

Change-Id: Id24a2c0c0c4d09fe1c9421a71ba421d73ec1a350
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 20:36:37 +00:00