Omit bazel.LabelList attrs if no path is specified
Test: go test build_conversion_test.go
Change-Id: Ibcd81049788e99422569fe74e5f3834df4a05122
diff --git a/android/paths.go b/android/paths.go
index c3fa61a..4495ad3 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -395,6 +395,9 @@
// `android:"path"` so that dependencies on other modules will have already been handled by the
// path_properties mutator.
func expandSrcsForBazel(ctx BazelConversionPathContext, paths, expandedExcludes []string) bazel.LabelList {
+ if paths == nil {
+ return bazel.LabelList{}
+ }
labels := bazel.LabelList{
Includes: []bazel.Label{},
}