Commit graph

7896 commits

Author SHA1 Message Date
Cole Faust
9a24d90936 Add more specific partition visibility rules
//visibility:any_system_partition, //visibility:any_vendor_partition,
etc.

Then, if a partition visibility rule is not specificed, but the module
is installed on a non-system partition via the `vendor: true` or other
properties, the visibility rule for that partition will be added by
default.

This is so that "any_partition" doesn't imply that modules could be put
on the vendor partition when they weren't designed for that, and so that
modules that do need to go on the vendor partition don't need to specify
both vendor: true and visibility:any_vendor_partition.

Eventually, the partition properties should be deprecated, and replaced
with just these visibility rules.

Bug: 321000103
Test: go tests
Change-Id: I24dba36bbc20921941f892480bf7c050e93827c6
2024-03-20 10:55:05 -07:00
Jiyong Park
8bcf3c64f1 Add required, host_required, and target_required as dependencies
So far, the installation of required modules were handled by Make. This
prevents us from implementing the module installation and packaging
entirely in Soong.

This CL is the first step towards that goal. Soong now correctly tracks
the dependencies and they are correctly returned by
TransitivePackagingSpecs(), which is used by packaging modules like
android_system_image.

Bug: 321626681
Test: build
Change-Id: I9192b5333ceaa0b7d1c5c4abeec2af62febcd976
2024-03-20 17:05:17 +09:00
Jihoon Kang
6e739b9b4d Merge "Propagate intermediateCacheFiles in java modules and filegroup" into main 2024-03-20 00:08:50 +00:00
Spandan Das
07145109ff Use RELEASE_DISABLE_VERIFY_OVERLAPS_CHECK to disable verify_overlaps
This build flag will be used to disable the check when prebuilts are
used in internal main. For backwards compatibilty,
RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE can also be used to disable
this check.

Test: m nothing
Bug: 328200369
Change-Id: I710811995723e75bea9de1ce5c77504f66cbcf45
2024-03-19 21:32:19 +00:00
Jihoon Kang
705e63e362 Propagate intermediateCacheFiles in java modules and filegroup
This change propagates the intermediateCacheFiles generated by the
aconfig_declarations to the static rdeps that are java modules or the
rdeps that are filegroups.

Test: m nothing
Bug: 329284345
Change-Id: I02431336c1aa0378d03248f3bb6edf2f57ec3b7f
2024-03-19 20:54:05 +00:00
Jeongik Cha
8b0192d031 Merge "//visibility:any_partition can be used with another visibility field" into main 2024-03-15 02:51:00 +00:00
Jeongik Cha
31be352612 //visibility:any_partition can be used with another visibility field
Bug: 321000103
Test: m nothing
Change-Id: I2f65ff4d51c65f974e2dc79c94dfefe180ddbfe4
2024-03-15 10:19:23 +09:00
Treehugger Robot
f1ffd090e7 Merge "Make select statements work on path properties" into main 2024-03-14 23:52:24 +00:00
Cole Faust
bdd8aeeb58 Make select statements work on path properties
Fixes: 329711542
Test: go test
Change-Id: I71f489c26c535174e226e4a9ab449cc2b4bee83a
2024-03-14 15:24:09 -07:00
Treehugger Robot
4e4939665e Merge "Generate info about the selected app variant in platform builds" into main 2024-03-14 22:05:43 +00:00
Yu Liu
f509eba41d Merge "Validate aconfig libs are built with the correct modes." into main 2024-03-14 18:39:12 +00:00
Spandan Das
3490dfd23f Generate info about the selected app variant in platform builds
This is a followup to aosp/2999198 and adds information about apps.

Each app will have an entry in this file with the following properties
- Name, mandatory
- Is_prebuilt, mandatory
- Prebuilt_info_file_path, optional

Implementation details
- Move prebuiltInfoProvider out of build/soong/apex to
  build/soong/android. This allows build/soong/java to use it.
- Introduce a new `prebuilt_info` prop to `android_app_set` and
  `android_app_import`
- All app module types will set a prebuiltInfoProvider in
  GenerateAndroidBuildActions, including the source app module types

Test: m nothing --no-skip-soong-tests
Test: m out/soong/prebuilt_info.json
Test: ls -l out/soong/prebuilt_info.json --human-readable
-rw------- 1 spandandas primarygroup 317K Mar 11 23:46 out/soong/prebuilt_info.json

Test: #modified trunk_staging.locally to select prebuilts of some
mainline apps. Spot-checked that `is_prebuilt` and
`prebuilt_info_file_path` get populated appropriately

Bug: 327480225
Change-Id: I5078e0ec26c9568194550909962b90111a5223f7
2024-03-14 18:12:30 +00:00
Treehugger Robot
66e8a75700 Merge "Add defaults support for apex_contributions module type" into main 2024-03-12 20:35:12 +00:00
Treehugger Robot
b952c84841 Merge "Allow PrevVendorApiLevel to be less than 34" into main 2024-03-11 04:56:59 +00:00
Cole Faust
256cfbee24 Remove starlark_import
This is no longer used since the roboleaf cancellation.

Bug: 315353489
Test: m nothing --no-skip-soong-tests
Change-Id: Ie6ee093c2810498306ea4a2288050eed17a35357
2024-03-07 10:53:41 -08:00
Yu Liu
67a28425a7 Validate aconfig libs are built with the correct modes.
Bug: 323071835
Test: Unit tests and manual tests.
Change-Id: I32de90826c7c8bb4d8495608e959d554820ab9a2
2024-03-07 18:51:16 +00:00
Cole Faust
fb8356c4c0 Merge "Replace starlark_import with hardcoded map" into main 2024-03-07 17:39:35 +00:00
Cole Faust
140180dd5b Merge "Select statements" into main 2024-03-07 17:39:27 +00:00
Cole Faust
5a231bd819 Select statements
See the blueprint cl for more information.

Things still to do:
 - Support selecting on product variables and
   variants
 - Test/Support property struct reflection tags
   like arch_variant, path, and variant_prepend
 - Test that selects combine well with existing
   configurability mechanisms like arch:, target:,
   multilib:, python's version:, etc.

Bug: 323382414
Test: go tests
Change-Id: If5d1ea1ad0c4ebabffaea91d62e1a1c6f926a793
2024-03-06 16:03:01 -08:00
Cole Faust
37bfb07722 Replace starlark_import with hardcoded map
With roboleaf being cancelled, we don't need the api levels to be
present in starlark.

Bug: 315353489
Test: Presubmits
Change-Id: I21ea61ced00a5b0ae066a9ca99a88a512bf115ac
2024-03-06 15:59:18 -08:00
Spandan Das
471d068893 Add defaults support for apex_contributions module type
Bug: 326246905
Test: go build ./android

Change-Id: I8be21594465d81c99c216b0fcbf9996aed46c209
2024-03-06 17:41:04 +00:00
Hsin-Yi Chen
890e7722e7 Allow PrevVendorApiLevel to be less than 34
Some developers need to set VendorApiLevel to 34. Though the
configuration is not officially supported, the ABI checker supports it
on a best-effort basis.

Test: make
Bug: 320347314
Change-Id: Ic3f5ea2028329f5d04606760b07947b7c98b2e51
2024-03-05 15:56:44 +08:00
Spandan Das
cbebb3437d Support partial module variants with apex_contributions am: 972917d794
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2978138

Change-Id: Ifc2ffd8b9cccf2151fd11e2111afb00912f91746
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-04 10:28:28 +00:00
Spandan Das
d1816e09f0 Fix non-determinism in prebuilt selection am: f2c1057586
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984036

Change-Id: Id4f52ec49aad78751373840c6e1dc252990db0f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-04 10:07:19 +00:00
Spandan Das
972917d794 Support partial module variants with apex_contributions
Some libraries like `libnativehelper_compat_libc++` only exist as shared
library in module sdk. When prebuilt of this library is selected using
apex_contritbutions, only shared linkages should be redirected to the
prebuilt version. The static linkage should come from source.

Test: Added a unit test
Bug: 322175508

Change-Id: Ic65d376b2354b4a42c7b9ea3ed1cd80c37e2840f
2024-03-04 08:39:20 +00:00
Spandan Das
f2c1057586 Fix non-determinism in prebuilt selection
This relands aosp/2978137 with acknowledgement of soong namespaces.

If multiple versions of the prebuilt module sdk share the same soong
config namespace, then PrebuiltPostDepsMutator rewrites rdeps to one of
those prebuilts in a non-deterministic way.

This CL uses apex_contributions to make this deterministic. Multiple
prebuilts will not be allowed to have their prefer evaluate to true. If
this happens, one of the prebuilts must be explicitly declared in
apex_contributions.

This CL also fixes the special-casing of the top-level
java_sdk_library_import in ReplaceDirectDependencies. For
framework-foo.v2, it will use BaseModuleName framework-foo instead of
SdkLibraryName framework-foo.v2 to determine if the source module has
been selected.

Test: ran the previously failing cmd of b/327552112
Test: Added a unit test
Test: aninja -t query
    out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar
    | grep module_sdk is empty (should not cause a regression for
    323454855)
Change-Id: Id484a41192085c50b7e34ad415c6e195edb0d006
2024-03-04 07:59:34 +00:00
Treehugger Robot
308388d2fa Merge "Add the build flags for apex contribution contents" into main am: e9f270a61f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2982634

Change-Id: I26305a22b59823db84b225850be812e4249110a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-01 00:13:48 +00:00
Treehugger Robot
e9f270a61f Merge "Add the build flags for apex contribution contents" into main 2024-02-29 23:34:15 +00:00
Treehugger Robot
33f110f428 Merge "Remove --multitree-build" into main am: 7c8cf91ff8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2982507

Change-Id: I86c17fc27621ce32ebf555ba4c2222b1ad4c0dec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 20:57:56 +00:00
Spandan Das
1e9810748e Merge "Revert "Fix non-determinism in prebuilt selection"" into main am: 5354483c12
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984372

Change-Id: I5c759faa655a3fa81f68ffbdb42dfb70ea4d22e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 18:05:11 +00:00
Spandan Das
06c64f0f12 Add the build flags for apex contribution contents
This will be used for source vs prebuilt selection of Google apps

Test: go build ./android
Bug: 326995930

Change-Id: Idb535c468534ed691431315edcf7a279024dc7f1
2024-02-29 15:36:20 +00:00
Spandan Das
af66212522 Revert "Fix non-determinism in prebuilt selection"
This reverts commit 2d8884a377.

Reason for revert: Build breakage https://groups.google.com/a/google.com/g/android-build-police-core/c/00mM-B9unVg/m/0FxBxpMbAwAJ. The validation does not check for namespace isolation which breaks libtonemap

Change-Id: Ieb4d3bc4f3ade856877ebb62a567620f5a1ed08c
2024-02-29 08:57:08 +00:00
Spandan Das
abd735bb6c Fix non-determinism in prebuilt selection am: 2d8884a377
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2978137

Change-Id: I4a4d775e19657dbd33ddd2017c40c8651315db3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 07:13:36 +00:00
Spandan Das
2d8884a377 Fix non-determinism in prebuilt selection
If multiple versions of the prebuilt module sdk share the same soong
config namespace, then PrebuiltPostDepsMutator rewrites rdeps to one of
those prebuilts in a non-deterministic way.

This CL uses apex_contributions to make this deterministic. Multiple
prebuilts will not be allowed to have their prefer evaluate to true. If
this happens, one of the prebuilts must be explicitly declared in
apex_contributions.

This CL also fixes the special-casing of the top-level
java_sdk_library_import in ReplaceDirectDependencies. For
framework-foo.v2, it will use BaseModuleName framework-foo instead of
SdkLibraryName framework-foo.v2 to determine if the source module has
been selected.

Test: Added a unit test
Test: aninja -t query
    out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar
    | grep module_sdk is empty (should not cause a regression for
    323454855)

Bug: TODO
Change-Id: I7191200c330c5bcb9d5532006d3c573a60db61cc
2024-02-29 06:34:49 +00:00
Cole Faust
331b27f511 Remove --multitree-build
Multitree has been discontinued.

Test: m nothing --no-skip-soong-tests
Change-Id: Ie4d96a11279bf0f20a5e1a49837d9df4b24b1662
2024-02-28 15:35:49 -08:00
Spandan Das
a0aa5e030b Ignore prebuilt apex_contributions in coverage builds am: bffd7fbaba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2976971

Change-Id: Ieba81fa75cec4a38159c16befa1d84c0df12aabc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-26 15:16:06 +00:00
Spandan Das
bffd7fbaba Ignore prebuilt apex_contributions in coverage builds
This CL unsets the prebuilt contents of a selected apex_contribution
in coverage builds. The effect of this will be that mainline modules
will be built from source with the following in coverage builds
1. Instrumentation turned on
2. RELEASE_ACONFIG_VALUE_SETS for that release config

Test: Added a unit test
Test: lunch cf_x86_64_phone-next-userdebug && EMMA_INSTRUMENT=true m nothing (with ag/26298763)
Bug: 325666427
Change-Id: Ic4e1f0612072377261602842dfd303c064095035
2024-02-26 10:07:45 +00:00
Jihoon Kang
d881124481 Convert the build flag RELEASE_EXPORT_RUNTIME_APIS to a product variable am: 35349466cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2973435

Change-Id: If699df9c820f06564446c5fac15ad79e2bb9365f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-23 02:36:45 +00:00
Jihoon Kang
14c69449f3 Introduce product variable PRODUCT_HIDDEN_API_EXPORTABLE_STUBS am: b36fc547c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2973434

Change-Id: I8a7ccf940ea8ce15ca3440488c2f7146bf0d58bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-23 02:36:40 +00:00
Jihoon Kang
35349466cd Convert the build flag RELEASE_EXPORT_RUNTIME_APIS to a product variable
RELEASE_EXPORT_RUNTIME_APIS build flag is currently used to modify the
filter condition for the "exportable" stubs, so that it exposes wider
set of flagged apis (ENABLED && READ_ONLY vs ENABLED || READ_WRITE).
This flag was originally introduced as a build flag to be enabled in
specific release configurations, but instead this is used as a product
variable that will be enabled in the product `sdk_with_runtime_apis`,
which will be introduced in a future change.

Test: m nothing --no-skip-soong-tests
Bug: 326312949
Change-Id: Ieb3cee517dd6cedcca844a9eab270aedf8199d4e
2024-02-22 20:10:22 +00:00
Jihoon Kang
b36fc547c0 Introduce product variable PRODUCT_HIDDEN_API_EXPORTABLE_STUBS
The new product variable behaves identical to the build flag
RELEASE_HIDDEN_API_EXPORTABLE_STUBS: if the variable is set to true, the
hiddenapi flags are generated from the "exportable" stubs (i.e. the
stubs that does not include READ_WRITE permission or DISABLE state
flagged apis) instead of the "everything" stubs (i.e. the stubs that
includes all flagged apis regardless of the state of the flags). If the
variable is set to false, the stubs are generated from the "everything"
stubs.

This product variable will be utilized for `sdk_with_runtime_apis`
product in the future changes.

Test: m nothing
Bug: 326310637
Change-Id: I8872d0b0617eb0f25da32611837ad823c77b0df7
2024-02-22 20:09:46 +00:00
Cole Faust
f93a27af9e Merge "Allow soong config value variables to set nested properties" into main am: c7a806a657
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2972371

Change-Id: I26f2bd95fc23bf3f96477911fe61210c78c79d7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-22 18:56:04 +00:00
Cole Faust
c7a806a657 Merge "Allow soong config value variables to set nested properties" into main 2024-02-22 18:22:02 +00:00
Nishant Panwar
705982f4e1 Merge "Add SDK library framework-pdf-v in MediaProvider" into main am: 6636216116
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2953730

Change-Id: Ia85d07580f2386735957dbfd8d159cffe8407d6e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-22 07:02:26 +00:00
Nishant Panwar
6636216116 Merge "Add SDK library framework-pdf-v in MediaProvider" into main 2024-02-22 06:32:14 +00:00
Cole Faust
1da0b20575 Allow soong config value variables to set nested properties
Previously, it would error out if it saw anything that wasn't a string
or slice of strings. Now it will also recurse in sub-structs.

Fixes: 326255534
Test: go test
Change-Id: Icbca8e4a2cf54b5610599a10805550fed05eb396
2024-02-21 11:38:09 -08:00
Spandan Das
5a1b90d2fa Merge "Revert "Revert "Create a product variable for skipping apex cont..."" into main am: 73f4a4a481
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2967067

Change-Id: Ib71d70a6b61ae25c5a8f6bfc4788ae517452ca32
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-20 08:42:23 +00:00
Spandan Das
73f4a4a481 Merge "Revert "Revert "Create a product variable for skipping apex cont..."" into main 2024-02-20 07:53:03 +00:00
Treehugger Robot
2e7afd66e0 Merge "Version LLNDK ABI dumps with VendorApiLevel" into main am: 3ce80aef7f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2952267

Change-Id: I2376a555fce6de5cbdaff51c3fc54e9bb9df18c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-17 06:39:59 +00:00
Treehugger Robot
3ce80aef7f Merge "Version LLNDK ABI dumps with VendorApiLevel" into main 2024-02-17 05:58:03 +00:00
Spandan Das
8ab28dd61d Revert "Revert "Create a product variable for skipping apex cont..."
Revert submission 2966055-revert-2964509-skip-apex-contributions-EOKWOFHENC

Reason for revert: The root cause CL has been reverted https://googleplex-android-review.git.corp.google.com/c/platform/vendor/google/build/+/26268799

Reverted changes: /q/submissionid:2966055-revert-2964509-skip-apex-contributions-EOKWOFHENC

Change-Id: I93e8f60124a09b4fba4675ac7f128ab553102bf7
2024-02-17 03:31:45 +00:00
Treehugger Robot
620753f9fa Merge "Revert "Create a product variable for skipping apex contribution..."" into main am: 3e48d693f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2966054

Change-Id: Id5ec5d2e9fea52488e78b1afea62d902a11f98f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-17 02:29:38 +00:00
Treehugger Robot
3e48d693f4 Merge "Revert "Create a product variable for skipping apex contribution..."" into main 2024-02-17 02:24:02 +00:00
Jihoon Kang
3801a965d5 Revert "Create a product variable for skipping apex contribution..."
Revert submission 2964509-skip-apex-contributions

Reason for revert: 325666427

Reverted changes: /q/submissionid:2964509-skip-apex-contributions

Change-Id: I510e81c8e06803dc014c9f04c3e357065aa19ce5
2024-02-16 23:25:06 +00:00
Spandan Das
beb624f3b0 Merge "Create a product variable for skipping apex contribution contents" into main am: 90db03c007
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2964564

Change-Id: Ide346f77130120b326b8e5342f719d3039e1dc5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 08:57:24 +00:00
Spandan Das
90db03c007 Merge "Create a product variable for skipping apex contribution contents" into main 2024-02-15 08:10:57 +00:00
Spandan Das
68a6e29ed5 Create a product variable for skipping apex contribution contents
This denylist will be used to ignore the prebuilt google apexes listed
in apex_contributions of vendor/google/build when building aosp products
in next.

Test: go build ./android
Bug: 308187268
Change-Id: Ib2c018a2aeda5578cf3f1a6a56253bf84850ba5f
Merged-In: Ib2c018a2aeda5578cf3f1a6a56253bf84850ba5f
2024-02-15 01:39:26 +00:00
Ronald Braunstein
3655e86fd1 Merge "Export teams even when module disabled." into main am: e48bcc2aaa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2962048

Change-Id: I93afdf935c6bff38318c720f456efb187806e7d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 21:37:27 +00:00
Ronald Braunstein
bb08413605 Export teams even when module disabled.
Some modules only build for arm, but the CI build producing the
all_teams proto artifact is building for X86 and the module was getting
left out.

The fix was to stop checking the Enabled() flag.

Test: m all_teams ; # inspected proto
Fixes: 325054164
Change-Id: I607c289f3ba47c2ddf6324ccff144712d782044d
2024-02-13 18:33:22 -08:00
Spandan Das
59bb373c64 Merge "Restrict verify_overlaps to pre S modules" into main am: 2dc86ebd3e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2958292

Change-Id: I350dea6abb51cb96bcfe8b093570ed809d8ccc62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-13 13:58:59 +00:00
Inseob Kim
c56d8743ea Merge "Revert^2 "Remove unused ToTSepolicyVersion"" into main am: 47074225df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2960342

Change-Id: I359475c38a38f77e18800f614b3e5e4fa1ab7454
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-13 13:55:25 +00:00
Spandan Das
2dc86ebd3e Merge "Restrict verify_overlaps to pre S modules" into main 2024-02-13 10:53:23 +00:00
Inseob Kim
47074225df Merge "Revert^2 "Remove unused ToTSepolicyVersion"" into main 2024-02-13 04:02:35 +00:00
Spandan Das
38c64f62cf Restrict verify_overlaps to pre S modules
The runtime in S and above does not have the same constraints that
require the hiddenapi flags to be generated in a monolithic manner.
This CL restricts the verify_overlaps to pre S modules. This will
filter out hiddenapi signature discrepancies that do not require
any action.

Test: verify_overlaps diff with this change https://diff.googleplex.com/#key=xxB0ky93hZRn
Test: presubmits
Bug: 313672880

Change-Id: Ie626a6779fc924563bec90b6c1ab0c7e8b4b23c2
2024-02-13 02:33:12 +00:00
Inseob Kim
dae1375433 Revert^2 "Remove unused ToTSepolicyVersion"
a1448e072e

Change-Id: I728d0633718669fb57877e7440dedf49ab980a00
2024-02-13 02:19:24 +00:00
Colin Cross
6001a85596 Merge changes from topic "revert-2952265-revert-2925209-KVPWEBRQHT-BBCOVJBOVF" into main am: a82de712b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2952969

Change-Id: I967620a4146acc414ad68c90839ad95a19431722
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-12 20:15:58 +00:00
Colin Cross
a82de712b3 Merge changes from topic "revert-2952265-revert-2925209-KVPWEBRQHT-BBCOVJBOVF" into main
* changes:
  Remove fdoProfileMutator
  Convert AFDO mutators to TransitionMutator
2024-02-12 19:31:00 +00:00
Nishant Panwar
0ce946587b Add SDK library framework-pdf-v in MediaProvider
SDK library for pdf related bootclasspath classes that were part of the non-updatable API before V, and were moved to the module in V. Other pdf related bootclasspath classes in mediaprovider should go to framework-pdf.

Bug: b/324667310
Test: presubmit and m
Change-Id: I41eb561edbade9609c58ad8ee3acdcc9bf03c0c5
2024-02-11 09:37:49 +00:00
Anas Sulaiman
884252056c Merge "Allow specifying sub-dir in sbox output" into main am: b129b7cba2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2954138

Change-Id: Id9e9b8f7f9b78604dbe5233883c526c9c1589a79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-09 13:19:23 +00:00
Anas Sulaiman
b129b7cba2 Merge "Allow specifying sub-dir in sbox output" into main 2024-02-09 12:47:01 +00:00
Jihoon Kang
5c1baf9627 Merge "Enable exportable stubs to include READ_WRITE aconfig flagged apis" into main am: 63f4cb6ed5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2952680

Change-Id: Ib2713f22f0046c989d30cd5feca95fc72f464a39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-09 00:41:26 +00:00
Anas Sulaiman
b4dff134db Allow specifying sub-dir in sbox output
xsdc commands end up using the same output directory inside sbox
for reading and writing the output archive, resulting in including
a partial copy of the archive in itself.

This change allows that rule to specify a sub-directory for the inputs
leaving the output archive outside of it.

Used by https://r.android.com/2955427

Bug: b/322788229
Test: Ran a couple of builds and confirmed no cache misses from xsdc.
Also manually checked an archive and confirmed
abcence of partial self-copies.

Change-Id: If709b111458a83d58906d919c3d2a7787bcbe4ee
2024-02-08 23:58:04 +00:00
Jihoon Kang
63f4cb6ed5 Merge "Enable exportable stubs to include READ_WRITE aconfig flagged apis" into main 2024-02-08 23:52:47 +00:00
Makoto Onuki
4a9869d066 Add android_ravenwood_test build rule
Modeled after android_robolectric_test.

Bug: 292141694
Test: m nothing --no-skip-soong-tests
Test: m hoststubgen ravenwood-runtime tradefed atest && atest-dev HostStubGenTest-framework-test
Merged-in: Ibef8953db45b86264c8a827868793b42f8f2d6ab
Change-Id: Ibef8953db45b86264c8a827868793b42f8f2d6ab
2024-02-08 09:25:35 -08:00
Treehugger Robot
5f14794455 Merge "Add GatherPackagingSpecsWithFilter" into main am: 45fd693433
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2955987

Change-Id: Ide3ef4fc643bfdc8bb073479c11dac05261e911d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 08:21:42 +00:00
Treehugger Robot
d1dfa74d1f Merge "Add property Exportable to aconfig_declarations" into main am: 900c8512cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2955614

Change-Id: Ie6ac67bdd6686e9a3505559f9dbb91b984f2ed4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 08:21:15 +00:00
Treehugger Robot
925ffb6718 Merge "Add //visibility:any_partition" into main am: 3be6f3fa58
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2954693

Change-Id: I5bd8d23517f44190d856434cac5fadbeadccd6fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 08:19:55 +00:00
Treehugger Robot
45fd693433 Merge "Add GatherPackagingSpecsWithFilter" into main 2024-02-08 08:11:14 +00:00
Treehugger Robot
900c8512cd Merge "Add property Exportable to aconfig_declarations" into main 2024-02-08 07:43:12 +00:00
Treehugger Robot
3be6f3fa58 Merge "Add //visibility:any_partition" into main 2024-02-08 07:34:33 +00:00
Zi Wang
0e5d16c6f0 Add property Exportable to aconfig_declarations
Only when aconfig_declarations explicitly set this property true,
its flags will be repackaged.

If a java_aconfig_library has mode "exported", its corresponding
aconfig_declarations must have exportable prop set to true.

Test: Added unit tests and CI

Bug: 310504781

Ignore-AOSP-First: this change will be cherry picked to aosp
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e4527f3010b3fd6f33948a15a9b4fdc944da34f0)
Merged-In: Ie9526e3755a6e7d142b377d5dd85a1bc60ffabc5
Change-Id: Ie9526e3755a6e7d142b377d5dd85a1bc60ffabc5
2024-02-08 06:19:34 +00:00
Ikjoon Jang
492a76e1c5 Merge "Revert "Remove unused ToTSepolicyVersion"" into main am: 62e3c24757
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2954989

Change-Id: Ic4502d052195cd48c6a41fdba6abd47325fb9810
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 04:50:47 +00:00
Ikjoon Jang
62e3c24757 Merge "Revert "Remove unused ToTSepolicyVersion"" into main 2024-02-08 04:47:20 +00:00
Ikjoon Jang
a1448e072e Revert "Remove unused ToTSepolicyVersion"
Revert submission 2952245-vfrc_as_tot_sepolicy

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=mainline_modules_arm64-mainline-userdebug&lkgb=11421838&lkbb=11421957&fkbb=11421841, b/324335916

Reverted changes: /q/submissionid:2952245-vfrc_as_tot_sepolicy

Bug: 324335916
Change-Id: I803ccc4c2d1e96f9e36b9d91eebc3e18e50b238f
2024-02-08 02:54:43 +00:00
Jeongik Cha
54bf875c97 Add GatherPackagingSpecsWithFilter
android_system_image used GatherPackagingSpecs and then filter only
system modules. But some modules were omitted in this logic because
there are modules which has the same relative path, so the later one is
ignored even though its partition info is what we're looking for. So add
filter logic in GatherPackagingSpecs to avoid this problem

Bug: 323793487
Test: build android_system_image, and then check if it contains every
module we want

Change-Id: Iec8ae920736d3d1920eecad71ba0f8f2fe848e6c
2024-02-08 11:14:43 +09:00
Inseob Kim
83c08b0224 Merge "Remove unused ToTSepolicyVersion" into main am: 5712af4792
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2912750

Change-Id: I9c7481e673960cbcb32ac1a22a1c1182b556d899
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 01:22:38 +00:00
Inseob Kim
5712af4792 Merge "Remove unused ToTSepolicyVersion" into main 2024-02-08 01:12:47 +00:00
Colin Cross
d38feb0d4a Convert AFDO mutators to TransitionMutator
Convert afdoDepsMutator and afdoMutator to a TransitionMutator as a
step towards variants-on-demand.

This relands Ib05845455ccf43a07b3915a0d7b0a95896062f13 with a fix
to maintain the current behavior of not using AFDO variants for
dependencies of the linker static binary.

Bug: 319288033
Bug: 324141705
Test: afdo_test.go
Change-Id: I76e30021173fc5b7e9e1fa826039776eb3dc7b6e
2024-02-07 15:51:40 -08:00
Cole Faust
d53e91ade8 Merge "Revert^2 "Enforce that soong config variables are identifiers"" into main am: c99c52f977
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2954688

Change-Id: I0abe6f81265ac37c38d4d9e7b4a0d9c09163c7b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-07 21:03:10 +00:00
Cole Faust
c99c52f977 Merge "Revert^2 "Enforce that soong config variables are identifiers"" into main 2024-02-07 20:25:00 +00:00
Cole Faust
894bb3b530 Add //visibility:any_partition
When we convert the partitions to be built with soong, there will
likely be separate partition modules per product. This means that a
lot of installable modules will have to be visible to a lot of
partitions. To make this easier, add the //visibility:any_partition
visibility spec, which allows the module to be used from any module
of type android_filesystem or android_system_image.

Fixes: 321000103
Test: go test
Change-Id: Iea1f1ab7d88dfdb1fd00f19eb8c9941693a2375f
2024-02-07 12:03:32 -08:00
Hsin-Yi Chen
2c4a9779cd Version LLNDK ABI dumps with VendorApiLevel
LLNDK version will be decoupled from SDK version. The ABI checker
loads the reference ABI dumps from
prebuilts/abi-dumps/vndk/<VendorApiLevel>.

Test: m libnativewindow
Bug: 314010764
Change-Id: I3e9f2cab58db0d1cc42f8c1abc13968617dacf14
2024-02-07 17:32:00 +08:00
Jihoon Kang
5919815f80 Enable exportable stubs to include READ_WRITE aconfig flagged apis
Currently in SDK build, "exportable" stubs are used to generate the
android.jar and the corresponding build artifacts, as well as the
hiddenapi flags. "exportable" stubs only include the flagged apis that
are "enabled" and "read only", and exclude all other flagged apis. This
will be replaced with "runtime" stubs in the long run, which include
"read_write" flagged apis on top of the "enabled" and "read only" flags.

Prior to Trunk Stable, the SDK build did not distinguish the target
audience of the SDK. That is, the identical build target was used to
generate the SDK targeted toward the Google3 developers (i.e. Google3
SDK drop) and the SDK targeted toward the public (i.e. Developer
Preview). However, given that we now have "experimental" apis with Trunk
Stable, there are demands to differentiate the SDK based on the target
audience, so that the "experimental" APIs are included in the SDK
targeted toward Google3 while they are excluded in the public facing
SDK.

The long term solution to achieve this is to generate the hiddenapi
flags and (conditionally) the SDKs using the runtime stubs. However, as
this is high priority, this change resolves the problem by modifying the
filter condition of the "exportable" stubs to include the "read_write"
flagged apis on top of the "enabled" and "read only" flagged apis when
the value of the default-false build flag "RELEASE_EXPORT_RUNTIME_APIS"
is set to true.

Note that this is a temporary solution; However, we might need to keep
the "RELEASE_EXPORT_RUNTIME_APIS" build flag even in the long run to
determine what set of apis are included in the generated SDK, based on
the target audience of the SDK.

Test: m nothing --no-skip-soong-tests
Bug: 323188988
Change-Id: If0d5fa74b3ba6f4a57c86aade8d340f149a657a2
2024-02-07 01:17:59 +00:00
Cole Faust
d92430e569 Revert^2 "Enforce that soong config variables are identifiers"
This reverts commit 149b5d003a.

Reason for revert: The variable that was causing issues before has been renamed

Change-Id: Ie0ffe9bf978332a2c921d21ccdf639b603fae39c
2024-02-07 01:02:04 +00:00
Jihoon Kang
0ea8cc9393 Merge "Introduce make var ANDROID_PUBLIC_EXPORTABLE_STUBS" into main am: d2e49a9261
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2950471

Change-Id: I54027149d4c08c02fa604ac6fa1825cc2d7fe6f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-06 22:50:59 +00:00
Jihoon Kang
d2e49a9261 Merge "Introduce make var ANDROID_PUBLIC_EXPORTABLE_STUBS" into main 2024-02-06 21:59:11 +00:00
Jihoon Kang
7cf2c0cce7 Introduce make var ANDROID_PUBLIC_EXPORTABLE_STUBS
ANDROID_PUBLIC_STUBS currently has multiple usages in the build, in
multiple .mk files.

Instead of modifying the current functionality of ANDROID_PUBLIC_STUBS
by replacing its value from "android_stubs_current" to
"android_stubs_current_exportable", this change introduces
ANDROID_PUBLIC_EXPORTABLE_STUBS, which evaluates to
"android_stubs_current_exportable" and used only when generating the
`full_target` in `development/build/Android.mk`.

Test: patch in git_main, lunch aosp_arm-ap31-eng && m sdk dist && inspect android.jar outputs
Bug: 323261972
Change-Id: Ic2b03a5a4afdefb459d89f8104916446599eaf31
2024-02-06 18:51:19 +00:00
Spandan Das
a75bd883f4 Merge "Mechanism to select a specific version of java_sdk_library_import" into main am: 7870d329a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2938840

Change-Id: Ida9a55976952aa264763cde8acd813e7a3154f83
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-06 18:38:56 +00:00
Spandan Das
7870d329a5 Merge "Mechanism to select a specific version of java_sdk_library_import" into main 2024-02-06 17:54:58 +00:00
Treehugger Robot
4cf995fc91 Merge "Revert "Enforce that soong config variables are identifiers"" into main am: d7e6bd8a04
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2950473

Change-Id: Ib01f0842cf3408e7e059f66ec11f0cc2a4e06fc1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-06 11:43:09 +00:00