-
I used this mill example to clarify my question:
How can I modify the Existing module deps does not help here because it just check that compilation is done in proper order. If I try something like this:
it compiles error:
I can ofcourse make a new task e.g.
but it is easier to use if no new commands/targets are needed for every dependency. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
To depend on all T.traverse(moduleDeps)(_.jar)() If you also want to depend on their transitive dependencies, use: T.traverse(recursiveModuleDeps)(_.jar)() Your override def jar: T[PathRef] = T {
T.traverse(moduleDeps)(_.jar)()
super.jar()
} Please note, that if you use |
Beta Was this translation helpful? Give feedback.
That's because you're not calling the
apply
-methods of the commands. Without, the commands in both lines won't evaluate. Instead, you return thesuper
-version as-is. SinceT.command
accepts aTask
as parameter andsuper.publishLocal(..)
is a task, the compiler will not notice too.Instead, your example should to look like this:
Notice the extra parenthesis (
()
) in both lines.