3

What is a recommended way to write an SBT task that downloads a file from a known URL into a local file?

Older versions of SBT provided IO.download which could be used to download a URL into a local file, but in recent versions (1.2.8) this method is not available and seem to be commented out in the code.

conny
  • 9,973
  • 6
  • 38
  • 47
thesamet
  • 6,382
  • 2
  • 31
  • 42

1 Answers1

4

As documented here:

import scala.sys.process._

url("http://...") #> file("somefile") !
thesamet
  • 6,382
  • 2
  • 31
  • 42