Make htmlGzNotice an internal variable instead of apexBundle field.
It's not read outside of the function / action generation logic, so keep it inside the function. Test: presubmits Fixes: 190817312 Change-Id: I0626e6c86adc584abb2a251cbc7ffb1bec2c7f59
This commit is contained in:
@@ -455,9 +455,6 @@ type apexBundle struct {
|
|||||||
// Processed file_contexts files
|
// Processed file_contexts files
|
||||||
fileContexts android.WritablePath
|
fileContexts android.WritablePath
|
||||||
|
|
||||||
// Path to notice file in html.gz format.
|
|
||||||
htmlGzNotice android.WritablePath
|
|
||||||
|
|
||||||
// The built APEX file. This is the main product.
|
// The built APEX file. This is the main product.
|
||||||
// Could be .apex or .capex
|
// Could be .apex or .capex
|
||||||
outputFile android.WritablePath
|
outputFile android.WritablePath
|
||||||
@@ -1903,9 +1900,6 @@ func (a *apexBundle) ProcessBazelQueryResponse(ctx android.ModuleContext) {
|
|||||||
apexType := a.properties.ApexType
|
apexType := a.properties.ApexType
|
||||||
switch apexType {
|
switch apexType {
|
||||||
case imageApex:
|
case imageApex:
|
||||||
|
|
||||||
// TODO(b/190817312): Generate the notice file from the apex rule.
|
|
||||||
a.htmlGzNotice = android.PathForBazelOut(ctx, "NOTICE.html.gz")
|
|
||||||
a.bundleModuleFile = android.PathForBazelOut(ctx, outputs.BundleFile)
|
a.bundleModuleFile = android.PathForBazelOut(ctx, outputs.BundleFile)
|
||||||
a.nativeApisUsedByModuleFile = android.ModuleOutPath(android.PathForBazelOut(ctx, outputs.SymbolsUsedByApex))
|
a.nativeApisUsedByModuleFile = android.ModuleOutPath(android.PathForBazelOut(ctx, outputs.SymbolsUsedByApex))
|
||||||
a.nativeApisBackedByModuleFile = android.ModuleOutPath(android.PathForBazelOut(ctx, outputs.BackingLibs))
|
a.nativeApisBackedByModuleFile = android.ModuleOutPath(android.PathForBazelOut(ctx, outputs.BackingLibs))
|
||||||
|
@@ -650,9 +650,9 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a NOTICE file, and embed it as an asset file in the APEX.
|
// Create a NOTICE file, and embed it as an asset file in the APEX.
|
||||||
a.htmlGzNotice = android.PathForModuleOut(ctx, "NOTICE.html.gz")
|
htmlGzNotice := android.PathForModuleOut(ctx, "NOTICE.html.gz")
|
||||||
android.BuildNoticeHtmlOutputFromLicenseMetadata(
|
android.BuildNoticeHtmlOutputFromLicenseMetadata(
|
||||||
ctx, a.htmlGzNotice, "", "",
|
ctx, htmlGzNotice, "", "",
|
||||||
[]string{
|
[]string{
|
||||||
android.PathForModuleInstall(ctx).String() + "/",
|
android.PathForModuleInstall(ctx).String() + "/",
|
||||||
android.PathForModuleInPartitionInstall(ctx, "apex").String() + "/",
|
android.PathForModuleInPartitionInstall(ctx, "apex").String() + "/",
|
||||||
@@ -660,7 +660,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
|
|||||||
noticeAssetPath := android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz")
|
noticeAssetPath := android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz")
|
||||||
builder := android.NewRuleBuilder(pctx, ctx)
|
builder := android.NewRuleBuilder(pctx, ctx)
|
||||||
builder.Command().Text("cp").
|
builder.Command().Text("cp").
|
||||||
Input(a.htmlGzNotice).
|
Input(htmlGzNotice).
|
||||||
Output(noticeAssetPath)
|
Output(noticeAssetPath)
|
||||||
builder.Build("notice_dir", "Building notice dir")
|
builder.Build("notice_dir", "Building notice dir")
|
||||||
implicitInputs = append(implicitInputs, noticeAssetPath)
|
implicitInputs = append(implicitInputs, noticeAssetPath)
|
||||||
|
Reference in New Issue
Block a user