mirror of https://github.com/sbt/sbt.git
Update IO library to sbt/IO v1.0.0-M1
This commit is contained in:
parent
650b37ff24
commit
b4e27ce471
|
|
@ -100,7 +100,7 @@ lazy val utilComplete = (project in internalPath / "util-complete").
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
// Util.crossBuild,
|
// Util.crossBuild,
|
||||||
name := "Util Completion",
|
name := "Util Completion",
|
||||||
libraryDependencies ++= Seq(jline, ioProj),
|
libraryDependencies ++= Seq(jline, sbtIO),
|
||||||
crossScalaVersions := Seq(scala210, scala211)
|
crossScalaVersions := Seq(scala210, scala211)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -135,7 +135,7 @@ lazy val utilCache = (project in internalPath / "util-cache").
|
||||||
settings(
|
settings(
|
||||||
commonSettings,
|
commonSettings,
|
||||||
name := "Util Cache",
|
name := "Util Cache",
|
||||||
libraryDependencies ++= Seq(sbinary, sbtSerialization, scalaReflect.value, ioProj) ++ scalaXml.value
|
libraryDependencies ++= Seq(sbinary, sbtSerialization, scalaReflect.value, sbtIO) ++ scalaXml.value
|
||||||
)
|
)
|
||||||
|
|
||||||
// Builds on cache to provide caching for filesystem-related operations
|
// Builds on cache to provide caching for filesystem-related operations
|
||||||
|
|
@ -144,5 +144,5 @@ lazy val utilTracking = (project in internalPath / "util-tracking").
|
||||||
settings(
|
settings(
|
||||||
commonSettings,
|
commonSettings,
|
||||||
name := "Util Tracking",
|
name := "Util Tracking",
|
||||||
libraryDependencies ++= Seq(ioProj)
|
libraryDependencies ++= Seq(sbtIO)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ package sbt
|
||||||
import java.io.{ File, FileNotFoundException }
|
import java.io.{ File, FileNotFoundException }
|
||||||
import sbinary.{ DefaultProtocol, Format, Operations }
|
import sbinary.{ DefaultProtocol, Format, Operations }
|
||||||
import scala.reflect.Manifest
|
import scala.reflect.Manifest
|
||||||
|
import sbt.io.IO
|
||||||
|
|
||||||
object CacheIO {
|
object CacheIO {
|
||||||
def toBytes[T](format: Format[T])(value: T)(implicit mf: Manifest[Format[T]]): Array[Byte] =
|
def toBytes[T](format: Format[T])(value: T)(implicit mf: Manifest[Format[T]]): Array[Byte] =
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import java.io.{ File, IOException }
|
||||||
import sbinary.{ DefaultProtocol, Format }
|
import sbinary.{ DefaultProtocol, Format }
|
||||||
import DefaultProtocol._
|
import DefaultProtocol._
|
||||||
import scala.reflect.Manifest
|
import scala.reflect.Manifest
|
||||||
|
import sbt.io.Hash
|
||||||
|
|
||||||
sealed trait FileInfo extends NotNull {
|
sealed trait FileInfo extends NotNull {
|
||||||
val file: File
|
val file: File
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import Types.:+:
|
||||||
import sbinary.{ DefaultProtocol, Format, Input, Output => Out }
|
import sbinary.{ DefaultProtocol, Format, Input, Output => Out }
|
||||||
import DefaultProtocol.ByteFormat
|
import DefaultProtocol.ByteFormat
|
||||||
import java.io.{ File, InputStream, OutputStream }
|
import java.io.{ File, InputStream, OutputStream }
|
||||||
|
import sbt.internal.io.Using
|
||||||
|
|
||||||
trait InputCache[I] {
|
trait InputCache[I] {
|
||||||
type Internal
|
type Internal
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package sbt.complete
|
package sbt.complete
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import sbt.IO
|
import sbt.io.IO
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These sources of examples are used in parsers for user input completion. An example of such a source is the
|
* These sources of examples are used in parsers for user input completion. An example of such a source is the
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ package sbt
|
||||||
package complete
|
package complete
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
import sbt.io.IO
|
||||||
|
|
||||||
object HistoryCommands {
|
object HistoryCommands {
|
||||||
val Start = "!"
|
val Start = "!"
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,8 @@ package sbt.complete
|
||||||
|
|
||||||
import org.specs2.mutable.Specification
|
import org.specs2.mutable.Specification
|
||||||
import org.specs2.specification.Scope
|
import org.specs2.specification.Scope
|
||||||
import sbt.IO.withTemporaryDirectory
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import sbt.IO._
|
import sbt.io.IO._
|
||||||
|
|
||||||
class FileExamplesTest extends Specification {
|
class FileExamplesTest extends Specification {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@ import sbinary.Format
|
||||||
import scala.pickling.PicklingException
|
import scala.pickling.PicklingException
|
||||||
import scala.reflect.Manifest
|
import scala.reflect.Manifest
|
||||||
import scala.collection.mutable
|
import scala.collection.mutable
|
||||||
import IO.{ delete, read, write }
|
import sbt.io.IO.{ delete, read, write }
|
||||||
|
import sbt.io.{ IO, Path }
|
||||||
|
import sbt.internal.io.Using
|
||||||
import sbt.serialization._
|
import sbt.serialization._
|
||||||
|
|
||||||
object Tracked {
|
object Tracked {
|
||||||
|
|
|
||||||
|
|
@ -6,21 +6,15 @@ object Dependencies {
|
||||||
lazy val scala211 = "2.11.7"
|
lazy val scala211 = "2.11.7"
|
||||||
|
|
||||||
val bootstrapSbtVersion = "0.13.8"
|
val bootstrapSbtVersion = "0.13.8"
|
||||||
// lazy val interfaceProj = "org.scala-sbt" % "interface" % bootstrapSbtVersion
|
|
||||||
lazy val ioProj = "org.scala-sbt" % "io" % bootstrapSbtVersion
|
|
||||||
// lazy val collectionProj = "org.scala-sbt" % "collections" % bootstrapSbtVersion
|
|
||||||
// lazy val logProj = "org.scala-sbt" % "logging" % bootstrapSbtVersion
|
|
||||||
// lazy val crossProj = "org.scala-sbt" % "cross" % bootstrapSbtVersion
|
|
||||||
|
|
||||||
|
lazy val sbtIO = "org.scala-sbt" %% "io" % "1.0.0-M1"
|
||||||
lazy val jline = "jline" % "jline" % "2.11"
|
lazy val jline = "jline" % "jline" % "2.11"
|
||||||
// lazy val launcherInterface = "org.scala-sbt" % "launcher-interface" % "1.0.0-M1"
|
|
||||||
// lazy val ivy = "org.scala-sbt.ivy" % "ivy" % "2.3.0-sbt-927bc9ded7f8fba63297cddd0d5a3d01d6ad5d8d"
|
|
||||||
// lazy val jsch = "com.jcraft" % "jsch" % "0.1.46" intransitive ()
|
|
||||||
lazy val sbtSerialization = "org.scala-sbt" %% "serialization" % "0.1.2"
|
lazy val sbtSerialization = "org.scala-sbt" %% "serialization" % "0.1.2"
|
||||||
lazy val sbinary = "org.scala-tools.sbinary" %% "sbinary" % "0.4.2"
|
lazy val sbinary = "org.scala-tools.sbinary" %% "sbinary" % "0.4.2"
|
||||||
// lazy val junit = "junit" % "junit" % "4.11"
|
|
||||||
lazy val scalaCompiler = Def.setting { "org.scala-lang" % "scala-compiler" % scalaVersion.value }
|
lazy val scalaCompiler = Def.setting { "org.scala-lang" % "scala-compiler" % scalaVersion.value }
|
||||||
lazy val scalaReflect = Def.setting { "org.scala-lang" % "scala-reflect" % scalaVersion.value }
|
lazy val scalaReflect = Def.setting { "org.scala-lang" % "scala-reflect" % scalaVersion.value }
|
||||||
|
|
||||||
private def scala211Module(name: String, moduleVersion: String) =
|
private def scala211Module(name: String, moduleVersion: String) =
|
||||||
Def.setting {
|
Def.setting {
|
||||||
scalaVersion.value match {
|
scalaVersion.value match {
|
||||||
|
|
@ -28,6 +22,7 @@ object Dependencies {
|
||||||
case _ => ("org.scala-lang.modules" %% name % moduleVersion) :: Nil
|
case _ => ("org.scala-lang.modules" %% name % moduleVersion) :: Nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lazy val scalaXml = scala211Module("scala-xml", "1.0.1")
|
lazy val scalaXml = scala211Module("scala-xml", "1.0.1")
|
||||||
|
|
||||||
lazy val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.11.4"
|
lazy val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.11.4"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue