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

Commit 96bbc2ff authored by android-build-prod (mdb)'s avatar android-build-prod (mdb) Committed by Gerrit Code Review
Browse files

Merge "Save list of AndroidProducts.mk files"

parents d126f7b5 567851c9
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -56,7 +56,14 @@ func NewSourceFinder(ctx Context, config Config) (f *finder.Finder) {
		RootDirs:         []string{"."},
		ExcludeDirs:      []string{".git", ".repo"},
		PruneFiles:       pruneFiles,
		IncludeFiles:     []string{"Android.mk", "Android.bp", "Blueprints", "CleanSpec.mk", "TEST_MAPPING"},
		IncludeFiles: []string{
			"Android.mk",
			"AndroidProducts.mk",
			"Android.bp",
			"Blueprints",
			"CleanSpec.mk",
			"TEST_MAPPING",
		},
	}
	dumpDir := config.FileListDir()
	f, err = finder.New(cacheParams, filesystem, logger.New(ioutil.Discard),
@@ -81,8 +88,16 @@ func FindSources(ctx Context, config Config, f *finder.Finder) {
		ctx.Fatalf("Could not export module list: %v", err)
	}

	androidProductsMks := f.FindNamedAt("device", "AndroidProducts.mk")
	androidProductsMks = append(androidProductsMks, f.FindNamedAt("vendor", "AndroidProducts.mk")...)
	androidProductsMks = append(androidProductsMks, f.FindNamedAt("product", "AndroidProducts.mk")...)
	err = dumpListToFile(androidProductsMks, filepath.Join(dumpDir, "AndroidProducts.mk.list"))
	if err != nil {
		ctx.Fatalf("Could not export product list: %v", err)
	}

	cleanSpecs := f.FindFirstNamedAt(".", "CleanSpec.mk")
	dumpListToFile(cleanSpecs, filepath.Join(dumpDir, "CleanSpec.mk.list"))
	err = dumpListToFile(cleanSpecs, filepath.Join(dumpDir, "CleanSpec.mk.list"))
	if err != nil {
		ctx.Fatalf("Could not export module list: %v", err)
	}