//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
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
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
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
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
This is no longer used since the roboleaf cancellation.
Bug: 315353489
Test: m nothing --no-skip-soong-tests
Change-Id: Ie6ee093c2810498306ea4a2288050eed17a35357
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
With roboleaf being cancelled, we don't need the api levels to be
present in starlark.
Bug: 315353489
Test: Presubmits
Change-Id: I21ea61ced00a5b0ae066a9ca99a88a512bf115ac
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
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
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
This will be used for source vs prebuilt selection of Google apps
Test: go build ./android
Bug: 326995930
Change-Id: Idb535c468534ed691431315edcf7a279024dc7f1
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
This reverts commit 149b5d003a.
Reason for revert: The variable that was causing issues before has been renamed
Change-Id: Ie0ffe9bf978332a2c921d21ccdf639b603fae39c
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