package sbt.internal.inc

import sbt.io.IO
import sbt.util.{ Level, Logger }

class IvyComponentCompilerSpec extends BridgeProviderSpecification {

  val scala282 = "2.8.2"
  val scala292 = "2.9.2"
  val scala210 = "2.10.5"
  val scala211 = "2.11.7"

  "IvyComponentCompiler" should "compile the bridge for Scala 2.8" in {
    IO.withTemporaryDirectory { tempDir =>
      getCompilerBridge(tempDir, Logger.Null, scala282) should exist
    }
  }

  it should "compile the bridge for Scala 2.9" in {
    IO.withTemporaryDirectory { tempDir =>
      getCompilerBridge(tempDir, Logger.Null, scala292) should exist
    }
  }

  it should "compile the bridge for Scala 2.10" in {
    IO.withTemporaryDirectory { tempDir =>
      getCompilerBridge(tempDir, Logger.Null, scala210) should exist
    }
  }

  it should "compile the bridge for Scala 2.11" in {
    IO.withTemporaryDirectory { tempDir =>
      getCompilerBridge(tempDir, Logger.Null, scala211) should exist
    }
  }

}

package sbt.internal.inc

import sbt.io.IO
import sbt.util.Logger

class IvyComponentCompilerSpec extends BridgeProviderSpecification {

  val scala282 = "2.8.2"
  val scala292 = "2.9.2"
  val scala210 = "2.10.5"
  val scala211 = "2.11.7"

  "IvyComponentCompiler" should "compile the bridge for Scala 2.8" in {
    IO.withTemporaryDirectory { tempDir =>
      getCompilerBridge(tempDir, Logger.Null, scala282) should exist
    }
  }

  it should "compile the bridge for Scala 2.9" in {
    IO.withTemporaryDirectory { tempDir =>
      getCompilerBridge(tempDir, Logger.Null, scala292) should exist
    }
  }

  it should "compile the bridge for Scala 2.10" in {
    IO.withTemporaryDirectory { tempDir =>
      getCompilerBridge(tempDir, Logger.Null, scala210) should exist
    }
  }

  it should "compile the bridge for Scala 2.11" in {
    IO.withTemporaryDirectory { tempDir =>
      getCompilerBridge(tempDir, Logger.Null, scala211) should exist
    }
  }

}

Fix command and definition of compiler bridge
Fix command and definition of compiler bridge

The compiler bridge had a dependency on the scala compiler in the
version defined in the build definition. This means that when trying to
fetch the compiler bridge for, say, Scala 2.9.2, we would also pull in
the Scala compiler 2.10.5.

The compiler bridge now has a "provided" dependency on the Scala
compiler.
