Commit Graph

57028 Commits

Author SHA1 Message Date
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
ad9827b3ab Add support to max-target-s to generate_hiddenapi_lists am: 9f2bcac707
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18163771

Change-Id: Ifbeb8833f43682e3ac4e30079fb764197e9affc1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 15:14:16 +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
0dab825ec0 Add missing dependency on compose plugin in kapt rules am: dddb402c02
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18142885

Change-Id: I5054ad84fffb070df3c9c01da4402589f44d090e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 19:18:45 +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
909ccb4600 Merge "Prevent non-app/non-test modules from statically including jacocoagent" into tm-dev am: fe45ae8feb
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18133382

Change-Id: Ibf2b4149dc32fe18341963381c35d993efe9af23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 13:23:17 +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
589ef71a6f Merge "Add buildinfo_prop module" into tm-dev am: a83d03c206
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/17948584

Change-Id: Idd3a5dd464fcf8daa3bdae1ec10157968ac7bd80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 05:24:14 +00:00
Yi Kong
c7cdd21930 Update clang version to clang-r450784d am: b3089e8a20
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18126207

Change-Id: I5c6339dd20ff492647f6e3cda626f0dac0f5a917
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 05:21:29 +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
b7001f9c55 Disable newapi check in defaults am: 2a42e55457
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18091384

Change-Id: I8374e4dd8b60ed4b09d328ad0bbe8f9b5900f238
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 22:37:42 +00:00
Spandan Das
bdee9243d5 Enforce newapi check only if min_sdk_version < compile_sdk_version am: a3264efb42
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18091383

Change-Id: I9b50e829b39b2751ad192f9dbab23a2eb33e083e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 22:37:41 +00:00
Paul Duffin
e803f3c617 Merge "java_sdk_library_import: Delegate OutputFiles to impl library if needed" into tm-dev am: 2b5384bc93
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18029221

Change-Id: I4c1fca6ffc6215d802712d560eb53950f2c27b05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 22:37:14 +00:00
Paul Duffin
266e752afe hiddenapi: Prevent libraries for Q/R from include S+ flags. am: a80cc174a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18089322

Change-Id: Ic0d0f544fe05a9eb6b7eb4814b08819e3eea7646
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 22:36:17 +00:00
Paul Duffin
3ac0b55cc5 Allow framework-media to build the framework-media.impl am: a083ec4acf
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18029210

Change-Id: Id734caa99fb186472f1fb4b35836b2bd826bc8a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 22:35:31 +00: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
103181e20b Merge "Set the dist dir for musl targets of build_version_test" into tm-dev am: 557e3fa4a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/17982168

Change-Id: I8d6cd3f8069cb1f6a2fab6bc4bf6d8e7f1a380d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 13:11:50 +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
d29ae688d3 Merge "Bump minimum minSdkVersion to 19." into tm-dev am: 8fc3fa09fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/17944288

Change-Id: Ie46f17e8bd132cdf57510564ef52897d983c6662
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 23:13:21 +00:00
TreeHugger Robot
8fc3fa09fa Merge "Bump minimum minSdkVersion to 19." into tm-dev 2022-04-27 22:05:18 +00:00
Yi Kong
31822bf494 Merge "Update to clang-r450784d" into tm-dev am: b5abdaef42
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/17956593

Change-Id: I28fe70b439d4d9721551b8207ad36525aa5b71b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 17:29:18 +00:00
Jingwen Chen
883b4c11d1 Append APEX version instead of build ID for APK-in-APEX paths. am: 3b1dcf4f46
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/17944887

Change-Id: Id26a96badc7e07b3a6bda48a94be543c81baf794
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 17:27:11 +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
cf7d2eddd8 Merge changes from topic "b/215723302" am: 66e6466e0f am: 4ed4ace5d9 am: 3f8e0c4846 am: 562477b1c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2002753

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

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

Change-Id: If5d7d2fbe324e6be04e3623f32c9b50194cab858
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 15:50:47 +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