Merge changes from topic "soong-license-metadata"

* changes:
  Add dependency license annotations
  Build license metadata files in Soong
  Escape Host*Variable contents
This commit is contained in:
Colin Cross
2021-12-10 21:43:49 +00:00
committed by Gerrit Code Review
12 changed files with 337 additions and 38 deletions

View File

@@ -474,6 +474,7 @@ type fillInEntriesContext interface {
ModuleDir(module blueprint.Module) string
Config() Config
ModuleProvider(module blueprint.Module, provider blueprint.ProviderKey) interface{}
ModuleHasProvider(module blueprint.Module, provider blueprint.ProviderKey) bool
}
func (a *AndroidMkEntries) fillInEntries(ctx fillInEntriesContext, mod blueprint.Module) {
@@ -609,6 +610,11 @@ func (a *AndroidMkEntries) fillInEntries(ctx fillInEntriesContext, mod blueprint
}
}
if ctx.ModuleHasProvider(mod, LicenseMetadataProvider) {
licenseMetadata := ctx.ModuleProvider(mod, LicenseMetadataProvider).(*LicenseMetadataInfo)
a.SetPath("LOCAL_SOONG_LICENSE_METADATA", licenseMetadata.LicenseMetadataPath)
}
extraCtx := &androidMkExtraEntriesContext{
ctx: ctx,
mod: mod,