diff options
author | 2024-08-27 15:54:00 +0000 | |
---|---|---|
committer | 2024-08-27 15:54:00 +0000 | |
commit | 4b98396c647e1b247c3b50ea723bfecac68a7789 (patch) | |
tree | 2d6a41ef6080beb50095a45fcff5280f941adae5 /android/module.go | |
parent | 1282d272918875cd8a15ea8e1cc4ac917d164266 (diff) | |
parent | ec810545481e6530b5f3c3da788e09aaae187c83 (diff) |
Merge "Remove licenseMetadataFile and installFiles from ModuleBase." into main
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/android/module.go b/android/module.go index 9e882ec06..0f01f0477 100644 --- a/android/module.go +++ b/android/module.go @@ -842,9 +842,6 @@ type ModuleBase struct { katiInitRcInstalls katiInstalls katiVintfInstalls katiInstalls - // The files to copy to the dist as explicitly specified in the .bp file. - distFiles TaggedDistFiles - hooks hooks registerProps []interface{} @@ -863,9 +860,6 @@ type ModuleBase struct { // Merged Aconfig files for all transitive deps. aconfigFilePaths Paths - // The path to the generated license metadata file for the module. - licenseMetadataFile WritablePath - // moduleInfoJSON can be filled out by GenerateAndroidBuildActions to write a JSON file that will // be included in the final module-info.json produced by Make. moduleInfoJSON *ModuleInfoJSON @@ -1768,12 +1762,17 @@ type InstallFilesInfo struct { PackagingSpecs []PackagingSpec // katiInstalls tracks the install rules that were created by Soong but are being exported // to Make to convert to ninja rules so that Make can add additional dependencies. - KatiInstalls katiInstalls - KatiSymlinks katiInstalls - TestData []DataPath - // This was private before, make it private again once we have better solution. - TransitiveInstallFiles *DepSet[InstallPath] + KatiInstalls katiInstalls + KatiSymlinks katiInstalls + TestData []DataPath TransitivePackagingSpecs *DepSet[PackagingSpec] + LicenseMetadataFile WritablePath + + // The following fields are private before, make it private again once we have + // better solution. + TransitiveInstallFiles *DepSet[InstallPath] + // The files to copy to the dist as explicitly specified in the .bp file. + DistFiles TaggedDistFiles } var InstallFilesProvider = blueprint.NewProvider[InstallFilesInfo]() @@ -1799,7 +1798,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) setContainerInfo(ctx) - m.licenseMetadataFile = PathForModuleOut(ctx, "meta_lic") + ctx.licenseMetadataFile = PathForModuleOut(ctx, "meta_lic") dependencyInstallFiles, dependencyPackagingSpecs := m.computeInstallDeps(ctx) // set the TransitiveInstallFiles to only the transitive dependencies to be used as the dependencies @@ -1967,11 +1966,12 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) // as GenerateTaggedDistFiles() calls OutputFiles(tag) and so relies on the // output paths being set which must be done before or during // GenerateAndroidBuildActions. - m.distFiles = m.GenerateTaggedDistFiles(ctx) + installFiles.DistFiles = m.GenerateTaggedDistFiles(ctx) if ctx.Failed() { return } + installFiles.LicenseMetadataFile = ctx.licenseMetadataFile installFiles.InstallFiles = ctx.installFiles installFiles.CheckbuildFiles = ctx.checkbuildFiles installFiles.PackagingSpecs = ctx.packagingSpecs @@ -1999,7 +1999,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) installFiles.TransitivePackagingSpecs = m.packagingSpecsDepSet SetProvider(ctx, InstallFilesProvider, installFiles) - buildLicenseMetadata(ctx, m.licenseMetadataFile) + buildLicenseMetadata(ctx, ctx.licenseMetadataFile) if m.moduleInfoJSON != nil { var installed InstallPaths |