aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-03-02 00:29:39 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-03-02 00:29:39 +0000
commitf66010de07ac358a0b06b74c164c1f4c71b84a77 (patch)
treee5c68c319d5af9a6267e65448c02397bebf11727 /java
parent003e0f3d2a2ae7227127d623c4011af7c4621602 (diff)
parenta7070c158ca2d2d5c842745f7cba037601bd0b81 (diff)
downloadbuild_soong-f66010de07ac358a0b06b74c164c1f4c71b84a77.tar.gz
build_soong-f66010de07ac358a0b06b74c164c1f4c71b84a77.tar.bz2
build_soong-f66010de07ac358a0b06b74c164c1f4c71b84a77.zip
Turn GlobFiles into a Glob for files, use it am: 540a78c1ce am: f49ff89266
am: a7070c158c Change-Id: I06f6cc4481f826de7f7923630c2de344c84603a6
Diffstat (limited to 'java')
-rw-r--r--java/app.go17
1 files changed, 2 insertions, 15 deletions
diff --git a/java/app.go b/java/app.go
index 34f05b73..ac88df79 100644
--- a/java/app.go
+++ b/java/app.go
@@ -342,17 +342,7 @@ func AndroidAppFactory() android.Module {
}
func resourceGlob(ctx android.ModuleContext, dir android.Path) android.Paths {
- var ret android.Paths
- files := ctx.Glob(filepath.Join(dir.String(), "**/*"), aaptIgnoreFilenames)
- for _, f := range files {
- if isDir, err := ctx.Fs().IsDir(f.String()); err != nil {
- ctx.ModuleErrorf("error in IsDir(%s): %s", f.String(), err.Error())
- return nil
- } else if !isDir {
- ret = append(ret, f)
- }
- }
- return ret
+ return ctx.GlobFiles(filepath.Join(dir.String(), "**/*"), aaptIgnoreFilenames)
}
type overlayGlobResult struct {
@@ -440,10 +430,7 @@ func (overlaySingleton) GenerateBuildActions(ctx android.SingletonContext) {
}
var paths android.Paths
for _, f := range files {
- if isDir, err := ctx.Fs().IsDir(f); err != nil {
- ctx.Errorf("error in IsDir(%s): %s", f, err.Error())
- return
- } else if !isDir {
+ if !strings.HasSuffix(f, "/") {
paths = append(paths, android.PathForSource(ctx, f))
}
}