Commit Graph

8230 Commits

Author SHA1 Message Date
Treehugger Robot
d40aac1340 Merge "Don't hold on to WritablePath" into main 2024-08-07 20:48:50 +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
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
b320ab283c Merge "Switch SBOM generation of products to Soong." into main 2024-08-06 18:17:36 +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
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
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
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
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
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
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
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
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
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
9f13555225 Merge "Generate SBOM of products in Soong." into main 2024-07-26 00:45:43 +00:00
Taylor Santiago
dd65d3e672 Merge "Add ABFS (Android Build Filesystem) configuration option to Soong" into main 2024-07-25 21:04:06 +00:00
Inseob Kim
036d9e6744 Conditionally pass kernel version to build.prop
This is to replicate Makefile's behavior as-is.

Bug: 322090587
Test: build and compare build command
Change-Id: Ib9ebec920701ea561a007bf2a1ae092ae1b4ff28
2024-07-25 20:15:54 +09:00
Inseob Kim
45ed4c2f9c Revert^4 "Use Soong-built system/build.prop"
ea04e564c2

Change-Id: I621be841ba5715479e321537866f8b3a880da397
2024-07-25 10:58:08 +00:00
Inseob Kim
26756a86c1 Revert^4 "Add TARGET_SYSTEM_PROP to system build.prop"
072c0e4fcb

Change-Id: I53a36f415a9bd472170f030f115039e623769acf
2024-07-25 10:58:08 +00:00
Inseob Kim
bf3222593a Revert^2 "Set output for build_prop even on Soong only build"
13c6231218

Change-Id: Ief5fd04e4ddb2fa884b16946b5b8baecc9da03ae
2024-07-25 10:58:08 +00:00
Pechetty Sravani (xWF)
13c6231218 Revert "Set output for build_prop even on Soong only build"
Revert submission 3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR

Reason for revert: Droidmonitor created revert due to b/355379515. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR

Change-Id: Iedc3434401d358ca4e716cdc056ff403eb3c5194
2024-07-25 09:21:09 +00:00
Pechetty Sravani (xWF)
072c0e4fcb Revert^3 "Add TARGET_SYSTEM_PROP to system build.prop"
ff506d1af2

Change-Id: I5659e93d4c45fdca20357b4fc61f936cfd0e748d
2024-07-25 09:21:09 +00:00
Pechetty Sravani (xWF)
ea04e564c2 Revert^3 "Use Soong-built system/build.prop"
625f66136d

Change-Id: I69b09646fb3286dcc5df638f87625f4eb8dcfcb2
2024-07-25 09:21:09 +00:00
Inseob Kim
b302108252 Merge "Set output for build_prop even on Soong only build" into main 2024-07-25 07:27:59 +00:00
Inseob Kim
625f66136d Revert^2 "Use Soong-built system/build.prop"
3ef9ed9848

Change-Id: I132ea8c2feabedc8b5e9bb8c0adb8f0995b9a2ec
2024-07-25 03:27:49 +00:00
Inseob Kim
ff506d1af2 Revert^2 "Add TARGET_SYSTEM_PROP to system build.prop"
027f50246f

Change-Id: I3e2e8d90029f897f1dbf76a829518cb7fe4a47b1
2024-07-25 03:27:49 +00:00
Inseob Kim
3a69282271 Set output for build_prop even on Soong only build
Without this change, Soong only build may break unexpectedly if some
modules refer to the build_prop module.

Bug: 322090587
Test: soong only build
Change-Id: I7571bdf0aa6c08ade8f130842c84c02bb0233acb
2024-07-25 11:54:28 +09:00
Inseob Kim
7d7baf7220 Merge changes from topic "revert-3184480-system_build_prop_soong-BZIDUTEOOC" into main
* changes:
  Revert "Add TARGET_SYSTEM_PROP to system build.prop"
  Revert "Sync gen_build_prop.py to sysprop.mk"
  Revert "Use Soong-built system/build.prop"
2024-07-25 02:48:23 +00:00
Inseob Kim
027f50246f Revert "Add TARGET_SYSTEM_PROP to system build.prop"
Revert submission 3184480-system_build_prop_soong

Reason for revert: breaks ndk and mainline build 

Reverted changes: /q/submissionid:3184480-system_build_prop_soong

Change-Id: Ic089dc3dfcbf2083d1bcf2413be432dcb61ce525
2024-07-25 02:45:53 +00:00