Switch Effective_license_text from []string to Paths
Effective_license_text contains paths to files that are copied from
one module to another and so need to be converted to Paths within the
context of the owning module as the paths are relative to the owning
module's directory.
The previous code did convert the license_text property to paths but
converted it back to strings again which was confusing and does not
follow the normal pattern.
Bug: 181569894
Test: m nothing
Change-Id: Iea09ee7f3de1187a2c3e41455ca83b0233d904b2
diff --git a/android/license.go b/android/license.go
index d571b1f..8bfd3ba 100644
--- a/android/license.go
+++ b/android/license.go
@@ -62,12 +62,12 @@
func (m *licenseModule) GenerateAndroidBuildActions(ctx ModuleContext) {
// license modules have no licenses, but license_kinds must refer to license_kind modules
- mergeProps(&m.base().commonProperties.Effective_licenses, ctx.ModuleName())
- mergeProps(&m.base().commonProperties.Effective_license_text, PathsForModuleSrc(ctx, m.properties.License_text).Strings()...)
+ mergeStringProps(&m.base().commonProperties.Effective_licenses, ctx.ModuleName())
+ mergePathProps(&m.base().commonProperties.Effective_license_text, PathsForModuleSrc(ctx, m.properties.License_text)...)
for _, module := range ctx.GetDirectDepsWithTag(licenseKindTag) {
if lk, ok := module.(*licenseKindModule); ok {
- mergeProps(&m.base().commonProperties.Effective_license_conditions, lk.properties.Conditions...)
- mergeProps(&m.base().commonProperties.Effective_license_kinds, ctx.OtherModuleName(module))
+ mergeStringProps(&m.base().commonProperties.Effective_license_conditions, lk.properties.Conditions...)
+ mergeStringProps(&m.base().commonProperties.Effective_license_kinds, ctx.OtherModuleName(module))
} else {
ctx.ModuleErrorf("license_kinds property %q is not a license_kind module", ctx.OtherModuleName(module))
}