Permalink
Browse files

set dependencies to testng into plugin

  • Loading branch information...
1 parent dabfa2a commit 2205e40a2419b736e9cb963759d0075d8d19a806 jtournay committed May 10, 2012
Showing with 15 additions and 3 deletions.
  1. +1 −1 sample/project/Build.scala
  2. +14 −2 src/main/scala/NGPlugin.scala
@@ -11,7 +11,7 @@ object ApplicationBuild extends Build {
)
val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
- // Add your own project settings here
+ // Add your own project settings here
)
}
@@ -7,7 +7,19 @@ import de.johoop.testngplugin.TestNGPlugin._
object NGPlugin extends Plugin {
- override def settings: Seq[Setting[_]] = super.settings ++ testNGSettings ++ Seq(
+ val PREFIX = "ng"
+
+ override def settings: Seq[Setting[_]] = super.settings ++ Seq(
+ scalaSource in Test <<= baseDirectory / "junit",
+ javaSource in Test <<= baseDirectory / "junit",
testListeners in Test := Seq()
- )
+ ) ++ inConfig(NGTest)(Defaults.testSettings ++ testNGSettings) ++ Seq(
+ scalaSource in NGTest <<= baseDirectory / "test",
+ javaSource in NGTest <<= baseDirectory / "test",
+ libraryDependencies <++= (testNGVersion in NGTest)(v => Seq(
+ "org.testng" % "testng" % v,
+ "de.johoop" %% "sbt-testng-interface" % "2.0.2"))
+ )
+
+ lazy val NGTest = config(PREFIX) extend(Test)
}

0 comments on commit 2205e40

Please sign in to comment.