Created
March 29, 2012 21:31
-
-
Save tekul/2244026 to your computer and use it in GitHub Desktop.
Gatling SBT Plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
object GatlingPlugin { | |
val gatling = TaskKey[Unit]("gatling") | |
val gatlingVersion = SettingKey[String]("gatling-version") | |
val gatlingResultsDirectory = SettingKey[String]("gatling-results-directory") | |
val gatlingDataDirectory = SettingKey[String]("gatling-data-directory") | |
val gatlingConfigFile = SettingKey[String]("gatling-config-file") | |
lazy val gatlingSettings = Seq( | |
gatlingVersion := "1.1.1", | |
fullClasspath in gatling <<= fullClasspath or (fullClasspath in Runtime), | |
gatlingResultsDirectory <<= target(_.getAbsolutePath + "/gatling-results"), | |
gatlingDataDirectory <<= (resourceDirectory in Compile).apply(_.getAbsolutePath), | |
gatlingConfigFile <<= (resourceDirectory in Compile).apply(_.getAbsolutePath + "/gatling.conf"), | |
libraryDependencies <+= (gatlingVersion) { gv => | |
"com.excilys.ebi.gatling.highcharts" % "gatling-charts-highcharts" % gv | |
}, | |
gatling <<= (streams, gatlingResultsDirectory, gatlingDataDirectory, gatlingConfigFile, fullClasspath in gatling, classDirectory in Compile, runner in run) | |
map { (s, grd, gdd, gcf, cp, cd, runner) => { | |
val args = Array("--results-folder", grd, | |
"--data-folder", gdd, | |
"--config-file", gcf, | |
"--simulations-binaries-folder", cd.absolutePath) | |
toError(runner.run("com.excilys.ebi.gatling.app.Gatling", Build.data(cp), args, s.log)) | |
} | |
} | |
) | |
} |
No, you're probably right. I started off with just http, then added app and highcharts as required, but I can just use highcharts if transitive deps will take care of the rest.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are you sure you need to explicitly depend on gatling-app and gatling-http as gatling-charts-highcharts depends on them with compile scope?