Commit Graph

8594 Commits

Author SHA1 Message Date
Treehugger Robot
f99ac31e34 Merge "Revert "Revert "Enable from-text stub generation in non-sdk java..."" into main am: 4f18cfdd7d am: 5d2439b3b1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3205865

Change-Id: I163753b63bc5b3b495d70ea46a15ebb5f58d2c68
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 19:25:01 +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
Treehugger Robot
dbbf70439a Merge "Disable ResourceProcessorBusyBox in kythe builds" into main am: 72ae33f6fa am: 3af7b11ed0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3207856

Change-Id: Id525ea73b2bd967ad7a94298ef6d762f4e3b3c3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 18:14:57 +00:00
Treehugger Robot
3af7b11ed0 Merge "Disable ResourceProcessorBusyBox in kythe builds" into main am: 72ae33f6fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3207856

Change-Id: I1df1b4f8b20aaff909a4838a7fd3c6d1d5cbd764
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 17:50:53 +00:00
Treehugger Robot
72ae33f6fa Merge "Disable ResourceProcessorBusyBox in kythe builds" into main 2024-08-06 17:34:36 +00:00
Spandan Das
9b45a8b9d5 Move the installation rules of boot images to soong am: 29207b57cf am: 9602753238
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3200723

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

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

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

Change-Id: I298312e534e440f607bff40cc9ceae788edba9e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 10:33:22 +00:00
Spandan Das
9602753238 Move the installation rules of boot images to soong am: 29207b57cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3200723

Change-Id: I8d99fe7855430a66f516ba3687faf51ace237c60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 10:18:00 +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
Spandan Das
29207b57cf Move the installation rules of boot images to soong
This CL adds moves the installation rules of boot images to soong. This
will eventually allow us to build devices by skipping `katiBuild` and
moving straight to `katiPackaging`

Details
1. Drop `no_full_install` from dex_bootjars singleton. This ensures that
   the files installed by this singleton module does not get skipped
when generating the soong installs file (out/soong/installs-*)
2. Replace PackageFile with InstallFile. This registers the installation
   rules for both make-built and soong-built images (e.g.
aosp_cf_system_x86_64)
3. Implement `AndroidMkEntries` for dex_bootjars singleton. OutputFile
   needs to be non-nil so that this module does not get elided when
generating out/soong/Android-*. `OutputFile` was abritrarily set to one
of the many files installed by this singleton.

Test: no diff in
target/product/vsoc_x86_64/obj/PACKAGING/system_intermediates/file_list.txt
(top of stack)
Bug: 355700341
Bug: 355703904

Change-Id: I3531defa6bba58ef78f6d66e881502a8222fc229
2024-08-06 02:27:17 +00:00
Spandan Das
a62d9563b4 Disable ResourceProcessorBusyBox in kythe builds
ResourceProcessorBusyBox generates the R.jar binary from R.txt without
creating an intermediate R.srcjar file. Disable this behavior in kythe
builds (ctx.Config().EmitXrefRules()) to support xrefs to R imports

Test: XREF_CORPUS=$internal_corpus m nothing
Test: aninja -t query out/soong/.intermediates/frameworks/libs/systemui/animationlib/animationlib_tests/android_common/animationlib_tests.kzip
Test: verified that an R.srcjar is present in its deps

Bug: 354854007
Change-Id: I2d63c3393c5bc58103c267c4593172ce77fbc79c
2024-08-06 00:45:49 +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
Spandan Das
d5db12db6e Merge "Create an installation rule to copy vdex to common arch device directory" into main am: acfa26b5ba am: c9335250b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3200722

Change-Id: Ida82c6b1390ed7f03b36010246fb4ca24f814509
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-05 17:50:16 +00:00
Spandan Das
c9335250b2 Merge "Create an installation rule to copy vdex to common arch device directory" into main am: acfa26b5ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3200722

Change-Id: I25a5681cdec7fa2e105a251503041b38d25cf917
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-05 17:34:12 +00:00
Spandan Das
acfa26b5ba Merge "Create an installation rule to copy vdex to common arch device directory" into main 2024-08-05 16:38:53 +00:00
Spandan Das
715594304d Create an installation rule to copy vdex to common arch device directory
The installation rules for soong built system images are generated by
soong, but the installation rules rules for make built images are still
generated by make in dex_preopt_libart.mk. There is an existing
discrepancy between the two. Make built images generates three
installation rules for
1. system/framework/<primary_arch>/$bootjar.vdex (symlink)
2. system/framework/<secondary_arch>/$bootjar.vdex (symlink)
3. system/framework/$bootjar.vdex (actual file)

Soong copies the file to (1), creates a symlink from (2) to (1) and
skips (3) altogether. This CL makes the Soong installation rules match
Make installation rules. This will eventually allow
us to build devices by skipping `katiBuild` and moving straight to
`katiPackaging`.

Test: no diff in make built installed files
target/product/vsoc_x86_64/obj/PACKAGING/system_intermediates/file_list.txt
(top of stack)

Test: debugfs out/target/product/vsoc_x86_64/system/etc/aosp_cf_system_x86_64.img
verified system/framework/boot-apache-xml.vdex exists
verified system/framework/x86/boot-apache-xml.vdex exists as a symlink
verified system/framework/x86_64/boot-apache-xml.vdex exists as a symlink

Bug: 355700341

Change-Id: I52853c07674b77a984b5a5ac5dcd69236b642b46
2024-08-05 02:18:03 +00:00
Cole Faust
39bd4adfe4 Merge "Tag resource_dirs as android:"path"" into main am: 3bec2a77a6 am: 855c130b32
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3203075

Change-Id: I6777f4099545e2ae748f7f0c48ea1e4aa804f505
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 18:15:55 +00:00
Cole Faust
855c130b32 Merge "Tag resource_dirs as android:"path"" into main am: 3bec2a77a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3203075

Change-Id: Idd595d679d76891546aebec6ca7146aae4942fc8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 17:57:54 +00:00
Cole Faust
3bec2a77a6 Merge "Tag resource_dirs as android:"path"" into main 2024-08-01 17:22:45 +00:00
Cole Faust
d65add2253 Tag resource_dirs as android:"path"
Resource_dirs is queried using PathsWithOptionalDefaultForModuleSrc,
which includes all the infrastructure to resolve module references,
but needs to be tagged android:"path" to be able to add the module
references as dependencies.

Test: Manually
Change-Id: Ie3f75332c9a4cc0ee4b4c93268188440ff7ce249
2024-07-31 16:42:33 -07:00
Zhi Dou
aae50d0dab Merge "Revert^2 "pass read new storage parameter to java codegen"" into main 2024-07-31 11:58:19 +00:00
Jerome Gaillard
14fe8f808b Merge "Handle missing dependencies in ravenwood.go" into main am: 6524e1d51c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3199471

Change-Id: I725805e93b8a3827f7697944f5fba603dc7c9f5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-31 11:16:23 +00:00
Jerome Gaillard
6524e1d51c Merge "Handle missing dependencies in ravenwood.go" into main 2024-07-31 11:02:10 +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
0328d3020c Merge "Make stub_libs property configurable" into main am: 33128360bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3200410

Change-Id: I837f3a4d77d778cac22ac713866f617f1a932c71
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 21:53:58 +00:00
Treehugger Robot
33128360bc Merge "Make stub_libs property configurable" into main 2024-07-30 21:34:47 +00:00
Zhi Dou
9612480ee2 Revert^2 "pass read new storage parameter to java codegen"
This reverts commit 848c6c939c.

Reason for revert: The real issue is fixed in another cl, not related to this one

Change-Id: Id12816206a16b17c23e3a53832d268f1600107b3
2024-07-30 20:26:49 +00:00
Cole Faust
aaff782cd6 Make stub_libs property configurable
To replace soong config module types with selects.

Bug: 342006386
Test: m nothing --no-skip-soong-tests
Change-Id: I76394c0c8e2bc98ec03a3a9d8cff0ba2af4ab0d1
2024-07-30 12:59:44 -07:00
Jerome Gaillard
44fc5bf548 Handle missing dependencies in ravenwood.go
This otherwise causes a crash when attempting any build
on macOS.

Test: build on macOS
Change-Id: Ib69160cd798091ae5f45416f332a0ea9927e1e50
2024-07-30 17:11:42 +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
Satish Yalla
848c6c939c Revert "pass read new storage parameter to java codegen"
This reverts commit c980327853.

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

Change-Id: Ifaaa33b07333683492bc54270b840df21bcd00ca
2024-07-30 03:56:25 +00:00
Treehugger Robot
3c115aefad Merge "Introduce build_from_text_stubs property in java_sdk_library" into main am: 77cd0a0080
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3198220

Change-Id: If4b48bd191483a2f9420584c6e12a745cb81d285
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-29 23:28:12 +00:00
Treehugger Robot
77cd0a0080 Merge "Introduce build_from_text_stubs property in java_sdk_library" into main 2024-07-29 23:13:52 +00:00
Jihoon Kang
48e2ac926b Introduce build_from_text_stubs property in java_sdk_library
Note that this property is currently a no-op. This change is submitted
separately in order to prevent submitting the entire topic in git_main
to mark a main-only module with this property.

Test: m nothing
Bug: 327507877
Change-Id: I62c2e3522bf9d0c5f7955e7c9bd2e0f66458e48c
2024-07-29 21:38:11 +00: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
Colin Cross
e0aa52f6c7 Run TestClasspath subtests in parallel
Call t.Parallel() to make the subtests of TestClasspath run in
parallel, which drops the runtime from 12 seconds to 1.7 seconds.

Test: TestClasspath
Flag: EXEMPT refactor
Change-Id: Id2194f6b5f925b480280e9cf8da5d5767a467430
2024-07-29 14:00:46 -07:00
Zhi Dou
c980327853 pass read new storage parameter to java codegen
When RELEASE_READ_FROM_NEW_STORAGE is true, enable reading from new
storage. So that we can ensure nextfood is not impacted.

Test: m and check cf
Bug: 349874828
Ignore-AOSP-First: the previous change ag/26821089 submitted internally this one depends on that change. The added code will be removed after test mission
Change-Id: I95ad9457e6d9c07a5a5b3074045a383f004113a9
2024-07-26 23:11:27 +00:00
Makoto Onuki
04dbebc08f Merge "Support resource APKs" into main am: 7c52907acf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3190452

Change-Id: I1fa73034575f7628e124c7904d190d7f86ac9a79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-25 22:36:42 +00:00
Makoto Onuki
7c52907acf Merge "Support resource APKs" into main 2024-07-25 22:18:19 +00:00