How to elegantly compose two tasks with SBT? -


i'd convert bash expression:

$ sbt clean lint 

into nice build.sbt expression like:

precommit := clean <> lint 

so can run following bash expression:

$ sbt precommit 

for example, more-or-less how you'd makefile:

lint:     echo linting     touch foo.txt  clean:     echo cleaning     rm -f foo.txt  precommit: clean lint 

the makefile can used like:

$ make precommit echo cleaning cleaning rm -f foo.txt echo linting linting touch foo.txt 

any ideas?

use sequential task

precommit := def.sequential(clean, lint).value 

while wearing bespoke british suit, driving aston martin on country road added elegance.


Comments