aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Kirillov <darthorimar@users.noreply.github.com>2017-07-19 18:49:21 +0300
committerIlya Kirillov <darthorimar@users.noreply.github.com>2017-07-19 18:49:21 +0300
commit1c3fd09486068c60767bd4bdaceb3f780cf0a160 (patch)
treef318e1e52e479898d58a9f981c181085362f3c5a
parent544b24b5b663633f4b94aacedfa6cdd9a6b3318a (diff)
downloadcbt-1c3fd09486068c60767bd4bdaceb3f780cf0a160.tar.gz
cbt-1c3fd09486068c60767bd4bdaceb3f780cf0a160.tar.bz2
cbt-1c3fd09486068c60767bd4bdaceb3f780cf0a160.zip
Add fuction for running specific main class
-rw-r--r--stage2/BasicBuild.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala
index 2b04614..76826ed 100644
--- a/stage2/BasicBuild.scala
+++ b/stage2/BasicBuild.scala
@@ -216,6 +216,16 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with SbtDep
def run: ExitCode = runMain( context.args )
+ def runMain: ExitCode = {
+ context.args.headOption match {
+ case Some(className) =>
+ runMain(className, context.args.drop(1))
+ case None =>
+ System.err.println("No classname is specified")
+ ExitCode.Failure
+ }
+ }
+
def test: Dependency = {
val testDirectory = projectDirectory / "test"
if( (testDirectory / lib.buildDirectoryName / lib.buildFileName).exists ){