aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJeff Gaston <jeffrygaston@google.com>2017-12-07 12:38:53 -0800
committerJeff Gaston <jeffrygaston@google.com>2017-12-07 13:00:51 -0800
commit29e959dd7f3a70a4dbffbf61e5187aaa7322ad17 (patch)
tree97935789c782603b295338883a24b32f644dd9ec /ui
parent4b9bb14dd2b6b606078187f555ceffce9c6c8a41 (diff)
downloadbuild_soong-29e959dd7f3a70a4dbffbf61e5187aaa7322ad17.tar.gz
build_soong-29e959dd7f3a70a4dbffbf61e5187aaa7322ad17.tar.bz2
build_soong-29e959dd7f3a70a4dbffbf61e5187aaa7322ad17.zip
Search for files named Blueprints only under build/blueprint
to enable other subprojects to use their own instance of Blueprint in other directories. Files named Android.bp are still autodetected throughout the tree like previously. Bug: 64363847 Test: mkdir -p subdir \ && echo "syntax error" > Blueprints \ && m -j nothing Test: build/soong/scripts/diff_build_graphs.sh \ --products=aosp_arm \ 'build/soong:work^' 'build/soong:work' Change-Id: I8199f12b68dc1699bf44682b86169def37b53a5e
Diffstat (limited to 'ui')
-rw-r--r--ui/build/finder.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/ui/build/finder.go b/ui/build/finder.go
index 010b3256..f35133bf 100644
--- a/ui/build/finder.go
+++ b/ui/build/finder.go
@@ -80,17 +80,8 @@ func FindSources(ctx Context, config Config, f *finder.Finder) {
ctx.Fatalf("Could not find modules: %v", err)
}
- isBlueprintFile := func(dir finder.DirEntries) (dirs []string, files []string) {
- files = []string{}
- for _, file := range dir.FileNames {
- if file == "Android.bp" || file == "Blueprints" {
- files = append(files, file)
- }
- }
-
- return dir.DirNames, files
- }
- androidBps := f.FindMatching(".", isBlueprintFile)
+ androidBps := f.FindNamedAt(".", "Android.bp")
+ androidBps = append(androidBps, f.FindNamedAt("build/blueprint", "Blueprints")...)
err = dumpListToFile(androidBps, filepath.Join(dumpDir, "Android.bp.list"))
if err != nil {
ctx.Fatalf("Could not find modules: %v", err)