Loading apex/builder.go +9 −3 Original line number Diff line number Diff line Loading @@ -617,10 +617,16 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) { } // Create a NOTICE file, and embed it as an asset file in the APEX. a.htmlGzNotice = android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz") a.htmlGzNotice = android.PathForModuleOut(ctx, "NOTICE.html.gz") android.BuildNoticeHtmlOutputFromLicenseMetadata(ctx, a.htmlGzNotice) implicitInputs = append(implicitInputs, a.htmlGzNotice) optFlags = append(optFlags, "--assets_dir "+filepath.Dir(a.htmlGzNotice.String())) noticeAssetPath := android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz") builder := android.NewRuleBuilder(pctx, ctx) builder.Command().Text("cp"). Input(a.htmlGzNotice). Output(noticeAssetPath) builder.Build("notice_dir", "Building notice dir") implicitInputs = append(implicitInputs, noticeAssetPath) optFlags = append(optFlags, "--assets_dir "+filepath.Dir(noticeAssetPath.String())) if (moduleMinSdkVersion.GreaterThan(android.SdkVersion_Android10) && !a.shouldGenerateHashtree()) && !compressionEnabled { // Apexes which are supposed to be installed in builtin dirs(/system, etc) Loading java/app.go +9 −3 Original line number Diff line number Diff line Loading @@ -586,10 +586,16 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) { } a.onDeviceDir = android.InstallPathToOnDevicePath(ctx, a.installDir) noticeFile := android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz") android.BuildNoticeHtmlOutputFromLicenseMetadata(ctx, noticeFile) if Bool(a.appProperties.Embed_notices) || ctx.Config().IsEnvTrue("ALWAYS_EMBED_NOTICES") { a.aapt.noticeFile = android.OptionalPathForPath(noticeFile) noticeFile := android.PathForModuleOut(ctx, "NOTICE.html.gz") android.BuildNoticeHtmlOutputFromLicenseMetadata(ctx, noticeFile) noticeAssetPath := android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz") builder := android.NewRuleBuilder(pctx, ctx) builder.Command().Text("cp"). Input(noticeFile). Output(noticeAssetPath) builder.Build("notice_dir", "Building notice dir") a.aapt.noticeFile = android.OptionalPathForPath(noticeAssetPath) } a.classLoaderContexts = a.usesLibrary.classLoaderContextForUsesLibDeps(ctx) Loading Loading
apex/builder.go +9 −3 Original line number Diff line number Diff line Loading @@ -617,10 +617,16 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) { } // Create a NOTICE file, and embed it as an asset file in the APEX. a.htmlGzNotice = android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz") a.htmlGzNotice = android.PathForModuleOut(ctx, "NOTICE.html.gz") android.BuildNoticeHtmlOutputFromLicenseMetadata(ctx, a.htmlGzNotice) implicitInputs = append(implicitInputs, a.htmlGzNotice) optFlags = append(optFlags, "--assets_dir "+filepath.Dir(a.htmlGzNotice.String())) noticeAssetPath := android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz") builder := android.NewRuleBuilder(pctx, ctx) builder.Command().Text("cp"). Input(a.htmlGzNotice). Output(noticeAssetPath) builder.Build("notice_dir", "Building notice dir") implicitInputs = append(implicitInputs, noticeAssetPath) optFlags = append(optFlags, "--assets_dir "+filepath.Dir(noticeAssetPath.String())) if (moduleMinSdkVersion.GreaterThan(android.SdkVersion_Android10) && !a.shouldGenerateHashtree()) && !compressionEnabled { // Apexes which are supposed to be installed in builtin dirs(/system, etc) Loading
java/app.go +9 −3 Original line number Diff line number Diff line Loading @@ -586,10 +586,16 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) { } a.onDeviceDir = android.InstallPathToOnDevicePath(ctx, a.installDir) noticeFile := android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz") android.BuildNoticeHtmlOutputFromLicenseMetadata(ctx, noticeFile) if Bool(a.appProperties.Embed_notices) || ctx.Config().IsEnvTrue("ALWAYS_EMBED_NOTICES") { a.aapt.noticeFile = android.OptionalPathForPath(noticeFile) noticeFile := android.PathForModuleOut(ctx, "NOTICE.html.gz") android.BuildNoticeHtmlOutputFromLicenseMetadata(ctx, noticeFile) noticeAssetPath := android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz") builder := android.NewRuleBuilder(pctx, ctx) builder.Command().Text("cp"). Input(noticeFile). Output(noticeAssetPath) builder.Build("notice_dir", "Building notice dir") a.aapt.noticeFile = android.OptionalPathForPath(noticeAssetPath) } a.classLoaderContexts = a.usesLibrary.classLoaderContextForUsesLibDeps(ctx) Loading