Andoird编译有时需要忽略某一个文件夹,如tests,可使用如下方法
build/core/main.mk
subdir_makefiles := \
$(shell build/tools/findleaves.py --prune=$(OUT_DIR) --prune=.repo --prune=.git $(subdirs) Android.mk
subdir_makefiles := \
$(shell build/tools/findleaves.py --prune=$(OUT_DIR) --prune=.repo --prune=.git --prune=tests $(subdirs) Android.mk
Android9.0以后,
build/soong/ui/build/finder.go
ExcludeDirs: []string{".git", ".repo"},
ExcludeDirs: []string{".git", ".repo", ".tests"},