Fix excluding resource directories

Using a glob as a path failed the existence check.  Append the
glob after converting the path to a string.

Test: TestExcludeResources in java_test.go
Change-Id: Ic1fd40aa283f3b0d59c1c589dbeec411583eddf1
This commit is contained in:
Colin Cross
2017-10-02 16:57:40 -07:00
parent 5a727dfa11
commit 0532fb0d4c
2 changed files with 40 additions and 1 deletions

View File

@@ -47,7 +47,8 @@ func ResourceDirsToJarArgs(ctx android.ModuleContext,
var excludes []string
for _, exclude := range excludeDirs {
excludes = append(excludes, android.PathForModuleSrc(ctx, exclude, "**/*").String())
excludes = append(excludes,
filepath.Join(android.PathForModuleSrc(ctx, exclude).String(), "**/*"))
}
excludes = append(excludes, resourceExcludes...)