Wrap PackageContext and SingletonContext

Wrap blueprint.PackageContext so that the *Func methods can provide
an android.Config instead of an interface{}.  The modified signatures
means that every method in ModuleContext and SingletonContext
that takes a blueprint.PackageContext now needs to be wrapped to
take an android.PackageContext.

SingletonContext wasn't previously wrapped at all, but as long
as it is, wrap everything like ModuleContext does.  This requires
updating every Singleton to use the android-specific methods.

Test: builds, all Soong tests pass
Change-Id: I4f22085ebca7def6c5cde49e8210b59d994ba625
This commit is contained in:
Colin Cross
2017-11-28 17:34:01 -08:00
parent f2a56f0e0d
commit 0875c52de7
21 changed files with 479 additions and 243 deletions

View File

@@ -74,7 +74,7 @@ type headerModule struct {
properties headerProperies
installPaths []string
installPaths android.Paths
licensePath android.ModuleSrcPath
}
@@ -139,7 +139,7 @@ func (m *headerModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
"expected header install path (%q) not equal to actual install path %q",
installPath, installedPath))
}
m.installPaths = append(m.installPaths, installPath.String())
m.installPaths = append(m.installPaths, installPath)
}
if len(m.installPaths) == 0 {
@@ -186,7 +186,7 @@ type preprocessedHeaderModule struct {
properties preprocessedHeaderProperies
installPaths []string
installPaths android.Paths
licensePath android.ModuleSrcPath
}
@@ -208,7 +208,7 @@ func (m *preprocessedHeaderModule) GenerateAndroidBuildActions(ctx android.Modul
installDir := getHeaderInstallDir(ctx, header, String(m.properties.From), String(m.properties.To))
installPath := installDir.Join(ctx, header.Base())
installPaths = append(installPaths, installPath)
m.installPaths = append(m.installPaths, installPath.String())
m.installPaths = append(m.installPaths, installPath)
}
if len(m.installPaths) == 0 {