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.