Merge "java_sdk_library_import: Copy all prebuilt properties to child modules"

This commit is contained in:
Paul Duffin
2022-09-29 10:28:41 +00:00
committed by Gerrit Code Review
3 changed files with 91 additions and 10 deletions

View File

@@ -56,7 +56,9 @@ func (t prebuiltDependencyTag) ExcludeFromApexContents() {}
var _ ExcludeFromVisibilityEnforcementTag = PrebuiltDepTag
var _ ExcludeFromApexContentsTag = PrebuiltDepTag
type PrebuiltProperties struct {
// UserSuppliedPrebuiltProperties contains the prebuilt properties that can be specified in an
// Android.bp file.
type UserSuppliedPrebuiltProperties struct {
// When prefer is set to true the prebuilt will be used instead of any source module with
// a matching name.
Prefer *bool `android:"arch_variant"`
@@ -70,6 +72,16 @@ type PrebuiltProperties struct {
// If specified then the prefer property is ignored in favor of the value of the Soong config
// variable.
Use_source_config_var *ConfigVarProperties
}
// CopyUserSuppliedPropertiesFromPrebuilt copies the user supplied prebuilt properties from the
// prebuilt properties.
func (u *UserSuppliedPrebuiltProperties) CopyUserSuppliedPropertiesFromPrebuilt(p *Prebuilt) {
*u = p.properties.UserSuppliedPrebuiltProperties
}
type PrebuiltProperties struct {
UserSuppliedPrebuiltProperties
SourceExists bool `blueprint:"mutated"`
UsePrebuilt bool `blueprint:"mutated"`