I need to define a custom tasks that computes the name of a main class and then runs it. I was thinking about something like this

```
customTask {
  mainClass = compute main class name based on env
  runMain(mainClass, jvm-args, fork=true)
}

```

and then in SBT i would be able to run

> 
> sbt> custom-task
> 
> 
> 

can this be done in SBT 11.2 ?.