SBT task depends on

Since SBT 0.13.13 it is deprecated ( <<=deprecated):

compile in Compile <<= (compile in Compile).dependsOn(apiDoc)

So the only way to find this:

compile in Compile := {
  apiDoc.value
  (compile in Compile).value
}

But now I have a warning about a useless expression apiDoc.value. But it is not useless! I cannot find documentation that this is a new way.

+4
source share
1 answer

I did not find the documents for this, but you can create dependsOnas:

compile.in(Compile) := compile.dependsOn(apiDoc).value

Note that if you do this for InputTask, you need to use evaluatedinstead value:

myInputTask := myInputTask.dependsOn(apiDoc).evaluated
+9
source

Source: https://habr.com/ru/post/1663947/


All Articles