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 =
Late answer but you can create new SBT tasks as mentioned in documentation http://www.scala-sbt.org/release/docs/Detailed-Topics/Tasks#defining-a-new-task
You can run any scala code as the task code. Tasks can also take input arguments.
Pretty much powerful IMO.