diff --git a/android/license_metadata.go b/android/license_metadata.go index f2ab0a44c..18f1ac563 100644 --- a/android/license_metadata.go +++ b/android/license_metadata.go @@ -67,6 +67,11 @@ func buildLicenseMetadata(ctx ModuleContext, licenseMetadataFile WritablePath) { return } + // Defaults add properties and dependencies that get processed on their own. + if ctx.OtherModuleDependencyTag(dep) == DefaultsDepTag { + return + } + if ctx.OtherModuleHasProvider(dep, LicenseMetadataProvider) { info := ctx.OtherModuleProvider(dep, LicenseMetadataProvider).(*LicenseMetadataInfo) allDepMetadataFiles = append(allDepMetadataFiles, info.LicenseMetadataPath)