Skip to content

Commit

Permalink
set dependencies to testng into plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jtournay committed May 10, 2012
1 parent dabfa2a commit 2205e40
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sample/project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

}
16 changes: 14 additions & 2 deletions src/main/scala/NGPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.