From 1c3fd09486068c60767bd4bdaceb3f780cf0a160 Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Wed, 19 Jul 2017 18:49:21 +0300 Subject: Add fuction for running specific main class --- stage2/BasicBuild.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 ){ -- cgit v1.2.3