Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b54eb83 authored by Jingwen Chen's avatar Jingwen Chen
Browse files

bp2build: remove manifest file for bp2build-sync.

The latter doesn't exist anymore, so there's no more need for the
bp2build file manifest.

Bug: 185817076
Test: TH
Change-Id: I6638b84eb371ced98474e3ca5026e3b33b824767
parent cbaef6ff
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ import (
	"android/soong/android"
	"fmt"
	"os"
	"strings"
)

// Codegen is the backend of bp2build. The code generator is responsible for
@@ -36,18 +35,12 @@ func Codegen(ctx *CodegenContext) CodegenMetrics {
	for _, f := range filesToWrite {
		p := getOrCreateOutputDir(outputDir, ctx, f.Dir).Join(ctx, f.Basename)
		if err := writeFile(ctx, p, f.Contents); err != nil {
			fmt.Errorf("Failed to write %q (dir %q) due to %q", f.Basename, f.Dir, err)
			panic(fmt.Errorf("Failed to write %q (dir %q) due to %q", f.Basename, f.Dir, err))
		}
		// if these generated files are modified, regenerate on next run.
		generatedBuildFiles = append(generatedBuildFiles, p.String())
	}

	// The MANIFEST file contains the full list of files generated by bp2build, excluding itself.
	// Its purpose is for downstream tools to understand the set of files converted by bp2build.
	manifestFile := outputDir.Join(ctx, "MANIFEST")
	writeFile(ctx, manifestFile, strings.Join(generatedBuildFiles, "\n"))
	generatedBuildFiles = append(generatedBuildFiles, manifestFile.String())

	return metrics
}