title: How can I use a library dependency in the definition of an sbt task?
body: <p>I am defining an sbt task that needs to call code in a library. Here is a build.sbt file with what I've tried so far:</p>
  
  <pre><code>libraryDependencies ++= Seq("com.some.company" %% "some-lib" % "1.0.0")
  
  val doSomething = taskKey[Unit]("does something")
  
  doSomething := {
    import com.some.company.function
    function()
  }
  </code></pre>
  
  <p>The imports do not work.  How do I define a task that depends on code in an external library?</p>