Skip to content

In the super-project, allow adding prerequisites to tasks defined in the sub-project #5

@michaeljbishop

Description

@michaeljbishop

As long as the super-project can reference tasks created in the sub-project, allow the sub-project tasks to have prerequisites attached to them in the super-project Rakefile.

So, to be clear, here are some tasks in in the subproject, located at foo.

task :hello do
  p "HELLO"
end
task :world => :hello do
  p "WORLD"
end
task :cruel do
  p "CRUEL"
end

And here is the super-project:

subproject 'foo'

task 'foo:world' => ['foo:cruel', 'period'] do
  p "AGAIN"
end
task 'period'  do
  p "."
end

Now, when executing the super project:

$ rake foo:world
HELLO
CRUEL
.
WORLD
AGAIN

The sub-project prerequisites are all executed before the super-task prerequisites.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions