(This relands aosp/3007754. The previous sdk build failures have been
resolved now)
The ignore list is burdensome to maintain once we start adding the
module sdk contents to apex_contributions. Convert the variable to a
boolean. When set to true, all contents in `apex_contributions` will be
ignored
Bug: 308187268
Test: m nothing on aosp,google and google_fullmte devices
Merged-In: Ibdd1e0d0d4f08f4f5251b9c4baa1aaf42e7df34f
(cherry picked from commit f3df7305d653471c70d131177e773b4723247e3a)
Change-Id: I9d57d899c6a9a321e2eb3579c954641f2cb04709
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/53721efb-c49e-4ce8-b96c-fd03598b4202).
Change-Id: I197b03b650bc6c22ff3c5eb9605522fd9650e98f
The ignore list is burdensome to maintain once we start adding the
module sdk contents to apex_contributions. Convert the variable to a
boolean. When set to true, all contents in `apex_contributions` will be
ignored
Bug: 308187268
Test: m nothing on aosp,google and google_fullmte devices
Ignore-AOSP-first: CL topic does a cleanup of an internal only denylist
Change-Id: Ibdd1e0d0d4f08f4f5251b9c4baa1aaf42e7df34f
Merged-In: Ibdd1e0d0d4f08f4f5251b9c4baa1aaf42e7df34f
(cherry picked from commit f3df7305d653471c70d131177e773b4723247e3a)
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
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
Every module belonging to a single mainline module family will be
hidden from make, except the one which has been flagged using
apex_contributions
Details
- Introduce a new `source_apex_name` property to prebuilt_apex and
override_apex. This property will be used to identify the source
equivalent of a prebuilt soong apex module.
- Create an N-ary tree from source to prebuilt(s). The tree wil be
rooted at the source module.
- In a subsequent mutator, visit every node in the tree(s). Query
apex_contributions and store the handle of the node which is "active"
(if any)
- In the same mutator, do another pass over the tree. Invoke
`HideFromMake` on every node which is not "active". The two-pass
approach is needed PrebuiltSelectionInfoProvider does not know about
the inter source-prebuilt dependency, this dependency can only be
known by doing a graph walk of the N-ary tree.
Some tangential implementation details
- Each prebuilt apex has an internal deapxer module that is responsible
for generating the deapex ninja rules. The name of this internal
module uses the BaseModuleName (without the prebuilt_ prefix). Since
we can have multiple prebuilt soong modules in trunk stable, change
this to follow the name of the prebuilt module in order to avoid name
collisions. Update existing unit tests accordingly
Bug: 316179314
Test: go test ./apex -run TestInstallationRulesForMultipleApexPrebuilts
Test: m nothing --no-skip-soong-tests
Test: presubmits
Change-Id: I58aa99d5e6a9859954614e6db9a8e9e2e581642d
Generating boot image requires a .prof file provided by the ART apex.
When building with prebuilts, this comes via the
prebuilt_bootclasspath_fragment module, which acts as a shim for
prebuilt_apex/apex_set. If we have multiple prebuilt apexes in the tree,
this shim becomes 1:many. This CL prepares dex_bootjars to select the
right .prof file when multiple prebuilts exist.
Implementation details
- Update deps mutator of dex_bootjars to create a dep on
all_apex_contributions. The latter contains information about which
apex is selected in a specific release configuration. dex_bootjars
will create a dependency on the selected apex in a postdeps phase
mutator.
- All apex module types (apex, prebuilt_apex and apex_set) will set a
provider that contains info about the location of the .prof file on
host
- dex_bootjars will access the provider of the selected apex to get the
location of the .prof file
This CL does not drop the old mechanism to get the .prof file (i.e. by
creating a dep on {prebuilt_}bootclasspath_fragment). Once all mainline
modules have been flagged using apex_contributions, the old mechanism
will be dropped
Bug: 308790457
Test: Added a unit test that checks that the right .prof is selected
when multiple prebuilts exists
Change-Id: I40fdb21416c46bed32f6ff187ce5153711ec2c69
Convert all of the callers of SetProvider to use the type-safe
android.SetProvider API.
Bug: 316410648
Test: builds
Change-Id: If58f4b5355264ddab2045bc3591a4eac19cd58fc
Convert all of the callers to NewProvider and NewMutatorProvider
to use a generic type parameter instead of an example object.
Bug: 316410648
Test: builds
Change-Id: Ic9cdafc87336e26730d3fd596df05de0e7267542
This will be a container for the the apex_contributions
selected using build flags. This module will be used to query the state of
selected apex contributions instead of a global that can be mutated by
anyone.
It will set a provider containing metadata for source vs prebuilts
selection. To reduce the overhead of a new mutator, this will be done in
the existing `prebuilt_select` mutator.
It will validate that there are no dups (`foo` and `prebuilt_foo` cannot
be both selected)
Bug: 308174923
Test: go test ./android
Change-Id: Ie42999a71f35d70e0e977f5ab07ce451608d9f35
This module type does not any build actions, but provides metadata about
the contributions of the mainline module to other mainline modules/
platform. One immediate use case for this metadata is source vs
prebuilts selection
Each mainline module can have more than 1 metadata modules. Static build
flags will be used to select the right one in trunk.bzl, next.bzl, ...
Bug: 308174923
Test: go build ./android
Change-Id: I5ead0c38fe64b78de08db1736d97a8ab7374d6d9