I am trying to print a warning message by setting the sbt parameter. My initial attempt looks something like this:
setting := { val log = streams.value.log val condition = //check something if (condition) { log.warn("Warning, condition! Specific functionality may not work.") //some default } else { //something else } }
However, since streams is a TaskKey, its value can only be accessed from tasks. In addition, my setting is reused by other settings, so I have no way to define it as a task.
Hence my question: what is the best way to print warnings during initialization setup?
source share