How do I use spaceDelimted in SBT?

I am trying to use spaceDelimted in my SBT plugin.

However, the "spaceDelimited" function could not be found. Should I turn it on somehow?

object MyPlugin extends Plugin {

    lazy val testInput = inputKey[Unit]("A demo input task.")

    lazy val mySettings = Seq(
        testInput := {
            val args: Seq[String] = spaceDelimited("<arg>").parsed
            args foreach println
        }
    )

}

      

The above code cannot compile because "spaceDelimited" was not found ...

How do I get "spaceDelimited" to be found - do I need to include a package?

thank

+3


source to share


1 answer


I found the answer, I just needed to add this line

import sbt.complete.DefaultParsers._

      



This will import the parsing spaceDelimited

+5


source







All Articles