diff options
Diffstat (limited to 'sbt-bridge/src/sbt-test/source-dependencies/replace-test-a/project')
-rw-r--r-- | sbt-bridge/src/sbt-test/source-dependencies/replace-test-a/project/Build.scala | 19 | ||||
-rw-r--r-- | sbt-bridge/src/sbt-test/source-dependencies/replace-test-a/project/DottyInjectedPlugin.scala | 17 |
2 files changed, 36 insertions, 0 deletions
diff --git a/sbt-bridge/src/sbt-test/source-dependencies/replace-test-a/project/Build.scala b/sbt-bridge/src/sbt-test/source-dependencies/replace-test-a/project/Build.scala new file mode 100644 index 000000000..9c2678540 --- /dev/null +++ b/sbt-bridge/src/sbt-test/source-dependencies/replace-test-a/project/Build.scala @@ -0,0 +1,19 @@ +import sbt._ +import Keys._ +import java.net.URLClassLoader + +object B extends Build +{ + lazy val root = Project("root", file(".")) settings( ss : _*) + + def ss = Seq( + TaskKey[Unit]("check-first") <<= checkTask("First"), + TaskKey[Unit]("check-second") <<= checkTask("Second") + ) + private def checkTask(className: String) = + fullClasspath in Configurations.Runtime map { runClasspath => + val cp = runClasspath.map(_.data.toURI.toURL).toArray + Class.forName(className, false, new URLClassLoader(cp)) + () + } +} diff --git a/sbt-bridge/src/sbt-test/source-dependencies/replace-test-a/project/DottyInjectedPlugin.scala b/sbt-bridge/src/sbt-test/source-dependencies/replace-test-a/project/DottyInjectedPlugin.scala new file mode 100644 index 000000000..3433779b6 --- /dev/null +++ b/sbt-bridge/src/sbt-test/source-dependencies/replace-test-a/project/DottyInjectedPlugin.scala @@ -0,0 +1,17 @@ +import sbt._ +import Keys._ + +object DottyInjectedPlugin extends AutoPlugin { + override def requires = plugins.JvmPlugin + override def trigger = allRequirements + + override val projectSettings = Seq( + scalaVersion := "0.1-SNAPSHOT", + scalaOrganization := "ch.epfl.lamp", + scalacOptions += "-language:Scala2", + scalaBinaryVersion := "2.11", + autoScalaLibrary := false, + libraryDependencies ++= Seq("org.scala-lang" % "scala-library" % "2.11.5"), + scalaCompilerBridgeSource := ("ch.epfl.lamp" % "dotty-bridge" % "0.1.1-SNAPSHOT" % "component").sources() + ) +} |