summaryrefslogtreecommitdiff
path: root/genrule/genrule.go
diff options
context:
space:
mode:
Diffstat (limited to 'genrule/genrule.go')
-rw-r--r--genrule/genrule.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 8fedc6073..e3823c5c1 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -344,6 +344,17 @@ func (g *Module) generateSourceFile(ctx android.ModuleContext, task generateTask
g.outputDeps = append(g.outputDeps, task.out[0])
}
+// Collect information for opening IDE project files in java/jdeps.go.
+func (g *Module) IDEInfo(dpInfo *android.IdeInfo) {
+ dpInfo.Srcs = append(dpInfo.Srcs, g.Srcs().Strings()...)
+ for _, src := range g.properties.Srcs {
+ if strings.HasPrefix(src, ":") {
+ src = strings.Trim(src, ":")
+ dpInfo.Deps = append(dpInfo.Deps, src)
+ }
+ }
+}
+
func generatorFactory(taskGenerator taskFunc, props ...interface{}) *Module {
module := &Module{
taskGenerator: taskGenerator,