aboutsummaryrefslogtreecommitdiff
path: root/sbt-bridge/bridge/src/sbt-test/source-dependencies/replace-test-a/project/Build.scala
blob: 9c26785404427957afd97b99942867fbc0cdff67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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))
			()
		}
}