Commit Graph

8704 Commits

Author SHA1 Message Date
Inseob Kim
01d4f8b823 Build product/odm build.prop with Soong
Bug: 322090587
Test: compare build.prop before and after, boot
Change-Id: I7a7dc785030a0c17e5c09b7f65c978fe9bbcb7a7
2024-08-08 18:13:08 +09:00
Treehugger Robot
3f0b5f6f12 Merge "Don't hold on to WritablePath" into main am: d40aac1340
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3198492

Change-Id: I4fdf37dbd48d995efc26f6784e61f5af57538f11
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-07 21:09:40 +00:00
Treehugger Robot
d40aac1340 Merge "Don't hold on to WritablePath" into main 2024-08-07 20:48:50 +00:00
Treehugger Robot
d658fea164 Merge "Remove the hardcoded list of api libraries" into main am: d6358b6a9b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3208811

Change-Id: If6b4054ae155e67d66b2ff7fd71b6b364961e750
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-07 00:00:03 +00:00
Jihoon Kang
463893917c Remove the hardcoded list of api libraries
The list no longer need to be maintained given that `java_sdk_library` modules generate from-text stubs by default.

Change-Id: I18c94731d0a337c8815fd589868377fc8933437c
Test: m nothing
Bug: 276958307
2024-08-06 22:39:16 +00:00
Treehugger Robot
5d2439b3b1 Merge "Revert "Revert "Enable from-text stub generation in non-sdk java..."" into main am: 4f18cfdd7d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3205865

Change-Id: I7815c3207e9d41df6e581be31ce3ec1948f7cdba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 19:06:28 +00:00
Treehugger Robot
4f18cfdd7d Merge "Revert "Revert "Enable from-text stub generation in non-sdk java..."" into main 2024-08-06 18:50:04 +00:00
Wei Li
4ba43fdf89 Merge "Switch SBOM generation of products to Soong." into main am: b320ab283c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3205082

Change-Id: I2eee1c23b24b66c9c29785011f3206cd37747f7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 18:21:23 +00:00
Wei Li
b320ab283c Merge "Switch SBOM generation of products to Soong." into main 2024-08-06 18:17:36 +00:00
Treehugger Robot
59f0d23ff6 Merge "Add system_ext support to build_prop module" into main am: 32b8daff1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3204632

Change-Id: I1f401c480670cd8ddacd351fc5ea5fb8f01fc6a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 10:15:58 +00:00
Treehugger Robot
fc413ce622 Merge "Hide unflagged mainline prebuilts with missing source." into main am: 9b10ca4711
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3203370

Change-Id: Idbd05e89c743e0b669092a0f77a1d70ebdfb350e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 10:15:41 +00:00
Jihoon Kang
ad5e953a7d Merge "Revert "Enable from-text stub generation in non-sdk java_sdk_library"" into main am: f6d9965cc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3207397

Change-Id: I46b1257ff9b15143ebed6c3a3e36db5d2617acf2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 10:14:59 +00:00
Treehugger Robot
696cea31d3 Merge "Enable from-text stub generation in non-sdk java_sdk_library" into main am: 99417ba9ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2983176

Change-Id: I01a3955f2c44dddff31a0b61bf18af34d243856e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 10:09:34 +00:00
Treehugger Robot
32b8daff1d Merge "Add system_ext support to build_prop module" into main 2024-08-06 02:00:28 +00:00
Jihoon Kang
b0f4c0239d Revert "Revert "Enable from-text stub generation in non-sdk java..."
Revert submission 3207397-revert-2982300-java_api_library_non_sdk-FIKZOSARQI

Reason for revert: Post submit build breakage culprit fixed

Reverted changes: /q/submissionid:3207397-revert-2982300-java_api_library_non_sdk-FIKZOSARQI

Change-Id: Ic79b7fd074f02febba94183cb1479874efe044b5
2024-08-06 00:15:25 +00:00
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