0

I would like to perform some checks before sbt assembly that make the build fail early when certain conditions are not met. What is the recommended way to do this?

Matthias Langer
  • 994
  • 8
  • 22

1 Answers1

0
assembly <<= assembly dependsOn myCheckTask
pfn
  • 1,820
  • 12
  • 11
  • That's exactly what I tried, but I see now that the reason that this was not working is that I did this in the root of a multi-project build. Is there a way to set this in the root project, so that it applies to all children? – Matthias Langer Oct 17 '15 at 16:28
  • `dependsOn(myTask in sub1, myTask in sub2, myTask in subN,...)` – pfn Oct 17 '15 at 16:34
  • Hmm, maybe I'm not following you correctly, but I want this the other way round: The assembly tasks in all sub projects should depend on single check task in the root project. Thanks a lot for you help! – Matthias Langer Oct 17 '15 at 17:30
  • Then `assembly in subN <<= (assembly in subN) dependsOn (myTask in root)` assuming you've named your root project, repeat for each subN – pfn Oct 17 '15 at 17:32