Add main classes

This commit is contained in:
exoego 2019-05-13 08:52:35 +09:00
parent 11b9722183
commit 278aeeb11f
3 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,8 @@
package a
object App {
def main(args: Array[String]): Unit = {
val a = new Core
println(s"Hello, world! ${a}")
}
}

View File

@ -5,13 +5,15 @@
lazy val core = (projectMatrix in file("core"))
.settings(
name := "core"
name := "core",
mainClass in (Compile, run) := Some("a.CoreMain")
)
.nativePlatform(scalaVersions = Seq("2.11.12", "2.11.11"))
lazy val app = (projectMatrix in file("app"))
.dependsOn(core)
.settings(
name := "app"
name := "app",
mainClass in (Compile, run) := Some("a.App")
)
.nativePlatform(scalaVersions = Seq("2.11.12"))

View File

@ -0,0 +1,6 @@
package a
object CoreMain {
def main(args: Array[String]): Unit = {
}
}