mirror of https://github.com/sbt/sbt.git
Merge pull request #3312 from smarter/zinc-main
Use the new Zinc main class detection
This commit is contained in:
commit
9429b76d67
|
|
@ -78,7 +78,6 @@ import xsbti.compile.IncToolOptionsUtil
|
||||||
import xsbti.CrossValue
|
import xsbti.CrossValue
|
||||||
|
|
||||||
// incremental compiler
|
// incremental compiler
|
||||||
import xsbt.api.Discovery
|
|
||||||
import xsbti.compile.{
|
import xsbti.compile.{
|
||||||
ClassFileManagerType,
|
ClassFileManagerType,
|
||||||
ClasspathOptionsUtil,
|
ClasspathOptionsUtil,
|
||||||
|
|
@ -1328,11 +1327,10 @@ object Defaults extends BuildCommon {
|
||||||
bgCopyClasspath in bgRunMain,
|
bgCopyClasspath in bgRunMain,
|
||||||
runner in run).evaluated
|
runner in run).evaluated
|
||||||
|
|
||||||
def discoverMainClasses(analysis: CompileAnalysis): Seq[String] =
|
def discoverMainClasses(analysis: CompileAnalysis): Seq[String] = analysis match {
|
||||||
Discovery
|
case analysis: Analysis =>
|
||||||
.applications(Tests.allDefs(analysis))
|
analysis.infos.allInfos.values.map(_.getMainClasses).flatten.toSeq.sorted
|
||||||
.collect({ case (definition, discovered) if discovered.hasMain => definition.name })
|
}
|
||||||
.sorted
|
|
||||||
|
|
||||||
def consoleProjectTask =
|
def consoleProjectTask =
|
||||||
Def.task {
|
Def.task {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue