Convert NewProvider/NewMutatorProvider to generic providers API
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
diff --git a/aconfig/aconfig_declarations.go b/aconfig/aconfig_declarations.go
index c4fc31a..272ab03 100644
--- a/aconfig/aconfig_declarations.go
+++ b/aconfig/aconfig_declarations.go
@@ -120,7 +120,7 @@
IntermediateDumpOutputPath android.WritablePath
}
-var DeclarationsProviderKey = blueprint.NewProvider(DeclarationsProviderData{})
+var DeclarationsProviderKey = blueprint.NewProvider[DeclarationsProviderData]()
// This is used to collect the aconfig declarations info on the transitive closure,
// the data is keyed on the container.
@@ -128,7 +128,7 @@
AconfigFiles map[string]android.Paths
}
-var TransitiveDeclarationsInfoProvider = blueprint.NewProvider(TransitiveDeclarationsInfo{})
+var TransitiveDeclarationsInfoProvider = blueprint.NewProvider[TransitiveDeclarationsInfo]()
func (module *DeclarationsModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// Get the values that came from the global RELEASE_ACONFIG_VALUE_SETS flag
diff --git a/aconfig/aconfig_value_set.go b/aconfig/aconfig_value_set.go
index 94c322a..4f142e5 100644
--- a/aconfig/aconfig_value_set.go
+++ b/aconfig/aconfig_value_set.go
@@ -54,7 +54,7 @@
AvailablePackages map[string]android.Paths
}
-var valueSetProviderKey = blueprint.NewProvider(valueSetProviderData{})
+var valueSetProviderKey = blueprint.NewProvider[valueSetProviderData]()
func (module *ValueSetModule) DepsMutator(ctx android.BottomUpMutatorContext) {
deps := ctx.AddDependency(ctx.Module(), valueSetTag, module.properties.Values...)
diff --git a/aconfig/aconfig_values.go b/aconfig/aconfig_values.go
index 621aae8..10205bb 100644
--- a/aconfig/aconfig_values.go
+++ b/aconfig/aconfig_values.go
@@ -52,7 +52,7 @@
Values android.Paths
}
-var valuesProviderKey = blueprint.NewProvider(valuesProviderData{})
+var valuesProviderKey = blueprint.NewProvider[valuesProviderData]()
func (module *ValuesModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
if len(module.properties.Package) == 0 {