diff --git a/android/module_context.go b/android/module_context.go index 0b4d28c54..a0a410428 100644 --- a/android/module_context.go +++ b/android/module_context.go @@ -114,7 +114,7 @@ type ModuleContext interface { // installed file will be returned by PackagingSpecs() on this module or by // TransitivePackagingSpecs() on modules that depend on this module through dependency tags // for which IsInstallDepNeeded returns true. - InstallExecutable(installPath InstallPath, name string, srcPath Path, deps ...Path) InstallPath + InstallExecutable(installPath InstallPath, name string, srcPath Path, deps ...InstallPath) InstallPath // InstallFile creates a rule to copy srcPath to name in the installPath directory, // with the given additional dependencies. @@ -123,7 +123,7 @@ type ModuleContext interface { // installed file will be returned by PackagingSpecs() on this module or by // TransitivePackagingSpecs() on modules that depend on this module through dependency tags // for which IsInstallDepNeeded returns true. - InstallFile(installPath InstallPath, name string, srcPath Path, deps ...Path) InstallPath + InstallFile(installPath InstallPath, name string, srcPath Path, deps ...InstallPath) InstallPath // InstallFileWithExtraFilesZip creates a rule to copy srcPath to name in the installPath // directory, and also unzip a zip file containing extra files to install into the same @@ -133,7 +133,7 @@ type ModuleContext interface { // installed file will be returned by PackagingSpecs() on this module or by // TransitivePackagingSpecs() on modules that depend on this module through dependency tags // for which IsInstallDepNeeded returns true. - InstallFileWithExtraFilesZip(installPath InstallPath, name string, srcPath Path, extraZip Path, deps ...Path) InstallPath + InstallFileWithExtraFilesZip(installPath InstallPath, name string, srcPath Path, extraZip Path, deps ...InstallPath) InstallPath // InstallSymlink creates a rule to create a symlink from src srcPath to name in the installPath // directory. @@ -451,17 +451,17 @@ func (m *moduleContext) skipInstall() bool { } func (m *moduleContext) InstallFile(installPath InstallPath, name string, srcPath Path, - deps ...Path) InstallPath { + deps ...InstallPath) InstallPath { return m.installFile(installPath, name, srcPath, deps, false, nil) } func (m *moduleContext) InstallExecutable(installPath InstallPath, name string, srcPath Path, - deps ...Path) InstallPath { + deps ...InstallPath) InstallPath { return m.installFile(installPath, name, srcPath, deps, true, nil) } func (m *moduleContext) InstallFileWithExtraFilesZip(installPath InstallPath, name string, srcPath Path, - extraZip Path, deps ...Path) InstallPath { + extraZip Path, deps ...InstallPath) InstallPath { return m.installFile(installPath, name, srcPath, deps, false, &extraFilesZip{ zip: extraZip, dir: installPath, @@ -487,23 +487,23 @@ func (m *moduleContext) packageFile(fullInstallPath InstallPath, srcPath Path, e return spec } -func (m *moduleContext) installFile(installPath InstallPath, name string, srcPath Path, deps []Path, +func (m *moduleContext) installFile(installPath InstallPath, name string, srcPath Path, deps []InstallPath, executable bool, extraZip *extraFilesZip) InstallPath { fullInstallPath := installPath.Join(m, name) m.module.base().hooks.runInstallHooks(m, srcPath, fullInstallPath, false) if !m.skipInstall() { - deps = append(deps, InstallPaths(m.module.base().installFilesDepSet.ToList()).Paths()...) + deps = append(deps, InstallPaths(m.module.base().installFilesDepSet.ToList())...) var implicitDeps, orderOnlyDeps Paths if m.Host() { // Installed host modules might be used during the build, depend directly on their // dependencies so their timestamp is updated whenever their dependency is updated - implicitDeps = deps + implicitDeps = InstallPaths(deps).Paths() } else { - orderOnlyDeps = deps + orderOnlyDeps = InstallPaths(deps).Paths() } if m.Config().KatiEnabled() { diff --git a/apex/apex.go b/apex/apex.go index 4c0230539..ecc794b5b 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1890,7 +1890,7 @@ func (a *apexBundle) ProcessBazelQueryResponse(ctx android.ModuleContext) { installSuffix = imageCapexSuffix } a.installedFile = ctx.InstallFile(a.installDir, a.Name()+installSuffix, a.outputFile, - a.compatSymlinks.Paths()...) + a.compatSymlinks...) // filesInfo in mixed mode must retrieve all information about the apex's // contents completely from the Starlark providers. It should never rely on diff --git a/apex/builder.go b/apex/builder.go index ba4df5f6b..909a4792a 100644 --- a/apex/builder.go +++ b/apex/builder.go @@ -956,7 +956,7 @@ func (a *apexBundle) buildApex(ctx android.ModuleContext) { // Install to $OUT/soong/{target,host}/.../apex. a.installedFile = ctx.InstallFile(a.installDir, a.Name()+installSuffix, a.outputFile, - a.compatSymlinks.Paths()...) + a.compatSymlinks...) // installed-files.txt is dist'ed a.installedFilesFile = a.buildInstalledFilesFile(ctx, a.outputFile, imageDir) diff --git a/apex/prebuilt.go b/apex/prebuilt.go index 7a9d23e54..7d339d54e 100644 --- a/apex/prebuilt.go +++ b/apex/prebuilt.go @@ -794,7 +794,7 @@ func (p *Prebuilt) GenerateAndroidBuildActions(ctx android.ModuleContext) { } if p.installable() { - p.installedFile = ctx.InstallFile(p.installDir, p.installFilename, p.inputApex, p.compatSymlinks.Paths()...) + p.installedFile = ctx.InstallFile(p.installDir, p.installFilename, p.inputApex, p.compatSymlinks...) p.provenanceMetaDataFile = provenance.GenerateArtifactProvenanceMetaData(ctx, p.inputApex, p.installedFile) } } diff --git a/java/app.go b/java/app.go index 41848ce0b..883b950e8 100755 --- a/java/app.go +++ b/java/app.go @@ -858,7 +858,7 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) { ctx.InstallFile(allowlistInstallPath, allowlistInstallFilename, a.privAppAllowlist.Path()) } - var extraInstalledPaths android.Paths + var extraInstalledPaths android.InstallPaths for _, extra := range a.extraOutputFiles { installed := ctx.InstallFile(a.installDir, extra.Base(), extra) extraInstalledPaths = append(extraInstalledPaths, installed) diff --git a/java/java.go b/java/java.go index 500ae37c7..bb9357cc7 100644 --- a/java/java.go +++ b/java/java.go @@ -641,7 +641,7 @@ type Library struct { exportedProguardFlagFiles android.Paths - InstallMixin func(ctx android.ModuleContext, installPath android.Path) (extraInstallDeps android.Paths) + InstallMixin func(ctx android.ModuleContext, installPath android.Path) (extraInstallDeps android.InstallPaths) } var _ android.ApexModule = (*Library)(nil) @@ -722,7 +722,7 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) { exclusivelyForApex := !apexInfo.IsForPlatform() if (Bool(j.properties.Installable) || ctx.Host()) && !exclusivelyForApex { - var extraInstallDeps android.Paths + var extraInstallDeps android.InstallPaths if j.InstallMixin != nil { extraInstallDeps = j.InstallMixin(ctx, j.outputFile) } diff --git a/java/ravenwood.go b/java/ravenwood.go index a03d8fb17..85f64a86c 100644 --- a/java/ravenwood.go +++ b/java/ravenwood.go @@ -16,6 +16,7 @@ package java import ( "android/soong/android" "android/soong/tradefed" + "github.com/google/blueprint/proptools" ) @@ -100,7 +101,7 @@ func (r *ravenwoodTest) GenerateAndroidBuildActions(ctx android.ModuleContext) { r.Library.GenerateAndroidBuildActions(ctx) // Start by depending on all files installed by dependancies - var installDeps android.Paths + var installDeps android.InstallPaths for _, dep := range ctx.GetDirectDepsWithTag(ravenwoodTag) { for _, installFile := range dep.FilesToInstall() { installDeps = append(installDeps, installFile) diff --git a/java/robolectric.go b/java/robolectric.go index a8e6bfaff..a66b31007 100644 --- a/java/robolectric.go +++ b/java/robolectric.go @@ -226,7 +226,7 @@ func (r *robolectricTest) GenerateAndroidBuildActions(ctx android.ModuleContext) } installPath := android.PathForModuleInstall(ctx, r.BaseModuleName()) - var installDeps android.Paths + var installDeps android.InstallPaths if r.manifest != nil { r.data = append(r.data, r.manifest) diff --git a/java/tradefed.go b/java/tradefed.go index ebbdec13d..349b327e8 100644 --- a/java/tradefed.go +++ b/java/tradefed.go @@ -30,8 +30,8 @@ func tradefedJavaLibraryFactory() android.Module { return module } -func tradefedJavaLibraryInstall(ctx android.ModuleContext, path android.Path) android.Paths { +func tradefedJavaLibraryInstall(ctx android.ModuleContext, path android.Path) android.InstallPaths { installedPath := ctx.InstallFile(android.PathForModuleInstall(ctx, "tradefed"), ctx.ModuleName()+".jar", path) - return android.Paths{installedPath} + return android.InstallPaths{installedPath} }