Commit Graph

8639 Commits

Author SHA1 Message Date
Treehugger Robot
9b10ca4711 Merge "Hide unflagged mainline prebuilts with missing source." into main 2024-08-05 23:10:53 +00:00
Jihoon Kang
f6d9965cc5 Merge "Revert "Enable from-text stub generation in non-sdk java_sdk_library"" into main 2024-08-05 20:51:31 +00:00
Liana Kazanova
a574cd28a8 Revert "Enable from-text stub generation in non-sdk java_sdk_library"
Revert submission 2982300-java_api_library_non_sdk

Reason for revert: DroidMonitor: Potential culprit for b/357648959 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:2982300-java_api_library_non_sdk

Change-Id: I5ef7afd9ec3e10ea99f82d02172843ad9b2cfda9
2024-08-05 19:45:03 +00:00
Spandan Das
85bd4625ed Hide unflagged mainline prebuilts with missing source.
Partner worksapces contain two versions of mainline prebuilts - BigAndroid
and Go. These two prebuilts export dexpreopt'd system server artifacts
to be installed in system image. Since the install paths are same, we
run into duplicate installation rules issue unless one of them is
hidden.

This hiding was previously done by creating a dependendency between
source aosp apex to BA and Go google prebuilts. However, this
implementaion had the unfortunate side effect on the packaging name of
the Google mainline prebuilts - the name becomes the aosp apex name.

Instead of creating the dependency to aosp apex, this CL hides all
mainline apex_set(s) if it has not been flagged using
RELEASE_APEX_CONTRIBUTIONS_*. Since there are some non mainline apex
prebuilts, apex_name will be used to determine whether the prebuilt is a
mainline module.

Test: m nothing --no-skip-soong-tests
Test: In partner workspaces, downloaded the CLs in b/355682304#comment7
Test: m out/target/product/generic/obj/PACKAGING/system_intermediates/file_list.txt
verified that aosp apexes are not installed, but mainline prebuilts are
installed

Test: unset RELEASE_APEX_CONTRIBUTIONS_ADSERVICES to build from source
Test: m out/target/product/generic/obj/PACKAGING/system_intermediates/file_list.txt
verified that aosp adservices is installed, and adservices prebuilt is
**not* installed.

Bug: 355682304
Change-Id: Idacb65313553bdea5c0593976694de478034229e
2024-08-05 18:25:37 +00:00
Treehugger Robot
99417ba9ea Merge "Enable from-text stub generation in non-sdk java_sdk_library" into main 2024-08-05 18:25:36 +00:00
Inseob Kim
acf9174120 Add system_ext support to build_prop module
As some partitions have build.prop under etc/, this change adds
relative_install_path property to build_prop module. Also this change
adds system_ext related Soong variables and system_ext support in
gen_build_prop.py.

Bug: 322090587
Test: build and compare system_ext/etc/build.prop
Change-Id: I416662b8bae09383af0cdd3d8444a5c300006b7b
2024-08-05 12:51:05 +09:00
Wei Li
b1af36a2a2 Switch SBOM generation of products to Soong.
Also remove the tests in sbom_test.sh for product SBOM generated by Make.

Bug: 324467079
Test: m sbom
Test: m dist
Test: banchan com.android.adbd module_arm64 userdebug && m sbom && m dist
Test: build/soong/tests/sbom_test.sh
Change-Id: Ie3f405f0a09a3b1f1176dba67167773801b9337a
2024-08-02 18:00:38 -07:00
Yu Liu
f072120c00 Skip writing ninja file for module with a cache hit during incremental build.
This is just the first change, many more will come to make this feature
really work. The main changes included here are:

1. Skip the writing of ninja file if a module has a cache hit.
2. Handle the case where a skipped module doesn't have the build defs
   info for the OrderOnlyStrings dedup logic to work by caching the
   missing info.

Bug: 335718784
Test: local manual tests
Change-Id: I32542bd1e7fd268113e072e7f68b51b293d83d03
2024-08-02 22:11:46 +00:00
yangbill
66e555c8c7 Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong
For building framework_compatibility_matrix.device.xml it will use
matrix file path from DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE, and
for product_compatibility_matrix.xml it will use matrix file path from
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE.
This CL import those value from make to soong and will be used in
hardware/interfaces/compatibility_matrices/.

Also add vintf.vintfCompatibilityMatrixRule to the white list for using
custom make rule.

Bug: 352234038
Bug: 344445679
Test: m product_compatibility_matrix.xml
Change-Id: Ib7042ee2d771bd47a12f0565014b4006da678ddb
2024-08-02 08:38:41 +00:00
Inseob Kim
e3a9c50b34 Merge changes from topic "revert-3200273-revert-3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA-PCKYAVELZP-XOXPVYPSBJ" into main am: 81e60c9c0b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3201032

Change-Id: I0eaf12f8c85663a2b579597baf203d3e396f84ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 00:05:22 +00:00
Inseob Kim
db166effa0 Revert^2 "Conditionally pass kernel version to build.prop" am: 6bd92d5924
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3199371

Change-Id: I47dd45bd74c11e604b17ee195f95a6e2575a23b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 00:05:16 +00:00
Inseob Kim
6fb79d21f5 Revert^6 "Add TARGET_SYSTEM_PROP to system build.prop" am: d8538e5db0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3201030

Change-Id: Ic6b0119e38b0c7e7592735289553e8e60e3c86ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 00:05:13 +00:00
Inseob Kim
9ed0b86ae8 Revert "Revert "Revert^2 "Set output for build_prop even on Soon..." am: 88b109e6b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3201033

Change-Id: I5a1607b9c86248ecc74591178d345608cdb45be1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 00:05:09 +00:00
Inseob Kim
81e60c9c0b Merge changes from topic "revert-3200273-revert-3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA-PCKYAVELZP-XOXPVYPSBJ" into main
* changes:
  Revert^6 "Use Soong-built system/build.prop"
  Revert^6 "Sync gen_build_prop.py to sysprop.mk"
  Revert^2 "Conditionally pass kernel version to build.prop"
  Revert^6 "Add TARGET_SYSTEM_PROP to system build.prop"
  Revert "Revert "Revert^2 "Set output for build_prop even on Soon..."
2024-08-01 00:02:58 +00:00
Yu Liu
cc3a65b73f Rename ModuleId to ModuleCacheKey and call the same named method on moduleInfo am: 2800675b31
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3190612

Change-Id: Iae9c8e69604ef75023b261b1ed4feeca9174f8e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-31 22:58:51 +00:00
Yu Liu
2800675b31 Rename ModuleId to ModuleCacheKey and call the same named method on moduleInfo
Bug: 335718784
Test: local manual tests
Change-Id: I364cd20281e52a1682f14a43c41bfe9993f04477
2024-07-31 21:38:15 +00:00
Jihoon Kang
8726ef8826 Merge "Convert imageMutator to TransitionMutator" into main am: 7eaa83707e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3202440

Change-Id: I5e4fd9545690fb0b76a99b3f904680e2412b7518
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-31 20:54:54 +00:00
Jihoon Kang
7eaa83707e Merge "Convert imageMutator to TransitionMutator" into main 2024-07-31 20:39:16 +00:00
Jihoon Kang
5402bbd8d7 Convert imageMutator to TransitionMutator
Replace android.imageMutator with a TransitionMutator

Test: diff out/soong/Android-<product>.mk
Bug: 319288033
Change-Id: Id6a50a2aacb32ecfadf7e45ada4956e85b55fef2
2024-07-31 18:53:06 +00:00
Inseob Kim
bc4ef22b9b Revert^6 "Use Soong-built system/build.prop"
d5a12721b5

Change-Id: I6f4bf3043e73763b047bec3303f1547ec647d12b
2024-07-31 02:18:22 +00:00
Inseob Kim
6bd92d5924 Revert^2 "Conditionally pass kernel version to build.prop"
This reverts commit 29fed1efe8.

Reason for revert: Fixed breakage with aosp/3200730, verified with ABTD

Change-Id: I207abd188636673250eb9a070be95db0b82f39e7
2024-07-31 02:17:49 +00:00
Inseob Kim
d8538e5db0 Revert^6 "Add TARGET_SYSTEM_PROP to system build.prop"
530c32acbe

Change-Id: I9dc817855e3db7b96320a977b24b84d72e762893
2024-07-31 02:17:39 +00:00
Inseob Kim
88b109e6b4 Revert "Revert "Revert^2 "Set output for build_prop even on Soon..."
Revert submission 3200273-revert-3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA-PCKYAVELZP

Reason for revert: fixed breakage with aosp/3200730, verified with ABTD

Reverted changes: /q/submissionid:3200273-revert-3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA-PCKYAVELZP

Change-Id: If9e6841bb915a79d9817838a1657017ddee9c1a7
2024-07-31 02:16:54 +00:00
Liana Kazanova
329f004d5f Revert^5 "Add TARGET_SYSTEM_PROP to system build.prop" am: 530c32acbe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3200273

Change-Id: I0c5a05a15eb9a16b5dddeff28ea11da211f787cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 23:51:09 +00:00
Liana Kazanova
712d73fe87 Revert^5 "Use Soong-built system/build.prop" am: d5a12721b5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3200271

Change-Id: I442c9150aa04915c89b0ad6c1860cffc1663931a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 23:51:01 +00:00
Liana Kazanova
75fc36f7ef Revert "Revert^2 "Set output for build_prop even on Soong only b..." am: a11ab980b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3200274

Change-Id: Idf17356940f1c345084d56172690c74eca48ef2b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 23:50:56 +00:00
Liana Kazanova
530c32acbe Revert^5 "Add TARGET_SYSTEM_PROP to system build.prop"
26756a86c1

Change-Id: Iad186b283ea78477c33bfc4519b9a27395557b55
2024-07-31 08:26:38 +09:00
Liana Kazanova
d5a12721b5 Revert^5 "Use Soong-built system/build.prop"
45ed4c2f9c

Change-Id: I574f29539d58239cd3f0e1ba6ae86e1b5d0f55ea
2024-07-30 23:22:51 +00:00
Liana Kazanova
6a64398e2f Merge "Revert "Conditionally pass kernel version to build.prop"" into main am: 2426d49060
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3199691

Change-Id: If8341d7a6a57d1e98116f899735dd37c794bf0b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 23:09:24 +00:00
Liana Kazanova
a11ab980b8 Revert "Revert^2 "Set output for build_prop even on Soong only b..."
Revert submission 3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA

Reason for revert: DroidMonitor: Potential culprit for b/356297315 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA

Change-Id: I40f63fdc0c25c37a7193ec09407498e707a55a37
2024-07-31 08:08:55 +09:00
Liana Kazanova
2426d49060 Merge "Revert "Conditionally pass kernel version to build.prop"" into main 2024-07-30 22:53:16 +00:00
Jihoon Kang
062eb663c5 Enable from-text stub generation in non-sdk java_sdk_library
This change allows from-text stubs to be generated for all
java_sdk_library modules, unlike how it is currently limited to the
modules that contribute to the api surfaces (i.e. the SDK).

This change accomplish this by modifying the dependency of the
from-text stubs generation, so that the sdk_library generated from-text
stubs generating java_api_library modules no longer depend on the full
api surface stubs, but generate the stubs in the module level, and
combined later to generate the full api surface stubs.

This change also removes the java_api_library modules defined in
core-libraries/Android.bp, which are passed to generate the system
modules. Given that the from-text vs from-source toggle is done within
the java_sdk_library stubs level, these modules no longer need to exist.

Implementation details:
- Allow sdk_version to be specified in java_api_library modules. For
  java_sdk_library-generated java_api_library modules, they inherit that
  of the sdk_library module. Some java_sdk_library modules that do not
  contribute to the api surface are allowed to set sdk_version to
  something other than "none" or "core".
- Implement java_api_library to implement `SdkContext`. This allows
  java_api_library to collect required deps from sdk_version (classpath,
  bootclasspath, system modules), and pass the collected jars when
  generating the stubs srcjar in metalava and compiling the stubs srcjar
  in javac.
- Remove hardcoded list of sdk_library modules that are allowed to
  genereate stubs from the api signature files, and allow from-text
  stubs generation by default. Modules that are not able to generate
  stubs from the api signature files are specified by setting the newly
  introduced `Build_from_text_stubs` property to `false`.

Test: ENABLE_HIDDENAPI_FLAGS=true m
Bug: 327507877
Change-Id: Ia35d2f3cf9fae48fc8c4bd99a84ae18d7c0e7bee
2024-07-30 22:35:06 +00:00
Treehugger Robot
ef0e74fcd5 Merge "Make the prefer property configurable" into main am: 6ae6f35d6c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3199692

Change-Id: I6fc0970ffbb59204a4e45cb170fde957a322a02a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 21:54:49 +00:00
Colin Cross
7707b246ef Don't hold on to WritablePath
Since only a single rule can write to a given WritablePath, it is
unecessary to hold on to the WritablePath once the rule has been
created.  Keeping a WritablePath causes complications, as it
prevents using the input Path as the output when no modifications to
the input file are necessary.  The normal pattern should be to create
a WritablePath using PathForModuleOut, build the rule that writes to
the WritablePath, and then store the WritablePath as a Path for use
as an input to any future rules.

WithoutRel previously only existed on OutputPath, which required
keeping the output path of the module as an OutputPath for as long
as possible in order to call WithoutRel on it at the end of the module.

Add WithoutRel to Path, make it always return a Path type, and implement
it on all the types that implement Path by using a helper in basePath.

Replace long-lived WritablePaths with Paths.

Test: all soong tests pass
Flag: EXEMPT refactor
Change-Id: I40f28075ce151e4be80d6cfc7ec173dfa46f9bbf
2024-07-30 14:46:13 -07:00
Treehugger Robot
6ae6f35d6c Merge "Make the prefer property configurable" into main 2024-07-30 21:46:07 +00:00
Cole Faust
12ff57d61c Make the prefer property configurable
To replace soong config modules with selects.

Bug: 342006386
Test: m nothing --no-skip-soong-tests
Change-Id: I56080c9a1647a072836d4e4e50d6a5d2c1a69d28
2024-07-30 13:17:28 -07:00
Liana Kazanova
29fed1efe8 Revert "Conditionally pass kernel version to build.prop"
This reverts commit 036d9e6744.

Reason for revert: DroidMonitor: Potential culprit for b/356297315 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: I58f1e43978eb812004d2e46fa7ce402e164d2800
2024-07-30 17:58:19 +00:00
Colin Cross
a428803c01 Merge changes I5f2fd123,Ie8d8e229,Id2194f6b into main am: be891d5a52
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3198490

Change-Id: I406cbac2c3406b6d6d34885c90895a73d382eb59
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 17:10:30 +00:00
Colin Cross
be891d5a52 Merge changes I5f2fd123,Ie8d8e229,Id2194f6b into main
* changes:
  Move RelativeToTop out of basePath
  Make PathForArbitraryOutput return an OutputPath
  Run TestClasspath subtests in parallel
2024-07-30 16:30:54 +00:00
Inseob Kim
bda41dcd88 Merge changes from topic "revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA" into main am: e1234e51b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3196490

Change-Id: Id58ae1f6413c3ff96c5b4460b733a68ce1075de3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 04:13:54 +00:00
Inseob Kim
65ed800943 Revert^4 "Use Soong-built system/build.prop" am: 45ed4c2f9c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3195649

Change-Id: I6e89b25d080279d13ffa5411331f05535cc60197
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 04:13:50 +00:00
Inseob Kim
9e6c42e3c1 Revert^4 "Add TARGET_SYSTEM_PROP to system build.prop" am: 26756a86c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3195647

Change-Id: I3c161aa680e78b07ec39f927f03f287594ebbfdc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 04:13:42 +00:00
Inseob Kim
6bdeec258a Revert^2 "Set output for build_prop even on Soong only build" am: bf3222593a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3195646

Change-Id: Id3ea41c3632af96350aa63cc5f5789bc8d7c5fba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 04:13:38 +00:00
Inseob Kim
e1234e51b8 Merge changes from topic "revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA" into main
* changes:
  Conditionally pass kernel version to build.prop
  Revert^4 "Use Soong-built system/build.prop"
  Revert^4 "Sync gen_build_prop.py to sysprop.mk"
  Revert^4 "Add TARGET_SYSTEM_PROP to system build.prop"
  Revert^2 "Set output for build_prop even on Soong only build"
2024-07-30 03:51:03 +00:00
Treehugger Robot
d1fb3378ca Merge "Cleanup configurable getter usages" into main am: c6f1fe0861
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3198402

Change-Id: I366cb688ab2ab4a42f45b90902f2892399ae434d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-29 21:05:28 +00:00
Colin Cross
bd73d0db41 Move RelativeToTop out of basePath
RelativeToTop is documented as returning the same concrete type that was
passed in, which wasn't true for SourcePath.  Implement it in SourcePath
and delete it from basePath.

Test: all soong tests pass
Flag: EXEMPT refactor
Change-Id: I5f2fd1237b964aa10565f7c6b34122dd6972fda9
2024-07-29 14:00:46 -07:00
Colin Cross
3b1c6847c4 Make PathForArbitraryOutput return an OutputPath
The only place basePath is used as a Path is when being returned from
PathForArbitraryOutput.  Using it as a Path requires implementing the
RelativeToTop() method on it, which then allowed that method to be
inherited by SourcePath, breaking the contract on RelativeToTop that
specifies that the returned Path is of the same concrete type as the
input Path.

Make PathForArbitraryOutput return an OutputPath, and update OutputPath
to support base paths that are not out/soong.  This also fixes
RelativeToTop, which was previously not working for PathForArbitraryOutput
paths.

Test: all soong tests pass
Flag: EXEMPT refactor
Change-Id: Ie8d8e2290961f35280e97137d2bd641c4d57ab87
2024-07-29 14:00:46 -07:00
Cole Faust
bf1d92ad20 Cleanup configurable getter usages
You don't have to call module.ConfigurableEvaluator(ctx) if ctx is
already a ModuleContext, you only need to do that for more restricted
contexts like SingletonContext.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I7612290d43dae7decfae283a341882d9016c98a3
2024-07-29 12:24:25 -07:00
Wei Li
b292d053ab Merge "Generate SBOM of products in Soong." into main am: 9f13555225
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2956732

Change-Id: I3176505722425598b5d8fca5cf96cffe4f07482b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-26 00:59:57 +00:00
Wei Li
9f13555225 Merge "Generate SBOM of products in Soong." into main 2024-07-26 00:45:43 +00:00