diff --git a/sbt/src/sbt-test/source-dependencies/replace-test-a/build.sbt b/sbt/src/sbt-test/source-dependencies/replace-test-a/build.sbt new file mode 100644 index 000000000..c719d724b --- /dev/null +++ b/sbt/src/sbt-test/source-dependencies/replace-test-a/build.sbt @@ -0,0 +1,14 @@ +import java.net.URLClassLoader + +lazy val root = (project in file(".")). + settings( + TaskKey[Unit]("check-first") <<= checkTask("First"), + TaskKey[Unit]("check-second") <<= checkTask("Second") + ) + +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/src/sbt-test/source-dependencies/replace-test-a/project/Build.scala b/sbt/src/sbt-test/source-dependencies/replace-test-a/project/Build.scala deleted file mode 100644 index 2739316a4..000000000 --- a/sbt/src/sbt-test/source-dependencies/replace-test-a/project/Build.scala +++ /dev/null @@ -1,20 +0,0 @@ -import sbt._ -import Import._ -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)) - () - } -}