title: Adding task in full build definition using SBT 0.13's new task syntax to project?
body: <p>I implemented a simple task to copy some files from a project's target directory to some other directory:</p>
  
  <pre><code>  lazy val publishFiles = taskKey[Unit]("publishes the files")
  
    lazy val publishFilesTask = publishFiles &lt;&lt;= (projectID, target, streams) map { (id, targetDir, streams) =&gt;
      val Sprint = "99"
      val DestBaseDir = "/some/folder"
      val DestDir = new File(s"$DestBaseDir/Sprint$Sprint/${id.name}")
      val log = streams.log
      val ScoverageReportDir = "scoverage-report"
      val CoberturaFileName = "cobertura.xml"
  
      if (DestDir.exists)
        log.error(s"Destination Directory $DestDir exists, exiting ...")
      else {
        log.info(s"Copying test coverage report to $DestDir ...")
        sbt.IO.createDirectory(DestDir)
        sbt.IO.copyDirectory(targetDir / ScoverageReportDir, DestDir / ScoverageReportDir, overwrite = false)
        sbt.IO.copyFile(targetDir / "coverage-report" / CoberturaFileName, DestDir / CoberturaFileName)
      }
    }
  </code></pre>
  
  <p>The task is added to the project's settings:</p>
  
  <pre><code>  lazy val settings = ... ++ publishFilesTask ++ ..
  </code></pre>
  
  <p>And it works.</p>
  
  <p>Now I wanted to change the task to use the new task syntax (introduced in sbt 0.13.0):</p>
  
  <pre><code>  lazy val publishFilesTask = taskKey[Unit]("publishes the files")
  
    publishFilesTask := {
      val Sprint = "99"
      val DestBaseDir = "/some/folder"
      val DestDir = new File(s"$DestBaseDir/Sprint$Sprint/${projectID.value.name}")
      val log = streams.value.log
      val ScoverageReportDir = "scoverage-report"
      val CoberturaFileName = "cobertura.xml"
  
      if (DestDir.exists)
        log.error(s"Destination Directory $DestDir exists, exiting ...")
      else {
        log.info(s"Copying test coverage report to $DestDir ...")
        sbt.IO.createDirectory(DestDir)
        sbt.IO.copyDirectory(target.value / ScoverageReportDir, DestDir / ScoverageReportDir, overwrite = false)
        sbt.IO.copyFile(target.value / "coverage-report" / CoberturaFileName, DestDir / CoberturaFileName)
      }
    }
  </code></pre>
  
  <p>So far, so good. But I don't how to add this task to a project. If I do it like with the old version</p>
  
  <pre><code>  lazy val settings = ... ++ publishFilesTask ++ ..
  </code></pre>
  
  <p>I'm getting this error:</p>
  
  <pre><code>  [error]  found   : sbt.TaskKey[Unit]
    [error]  required: scala.collection.GenTraversableOnce[?]
  </code></pre>
  
  <p>I looked at the documentation but did not find a solution for this issue. I guess it should be pretty easy...
    Im using sbt 0.13.0 (upgrade to a newer version is not possible at the moment) and my build script is a .scala build definition.</p>