Created
February 28, 2012 15:32
-
-
Save odwrotnie/1933146 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
import sbtassembly.Plugin._ | |
import AssemblyKeys._ | |
object SWTApp extends Build { | |
val osName = System.getProperty("os.name") | |
println("OS name: %s" format osName) | |
val osArch = System.getProperty("os.arch") | |
println("OS arch: %s" format osArch) | |
val (libDir, javaOpts) = System.getProperty("os.name").split(" ")(0).toLowerCase match { | |
case "mac" => ("lib-mac", Seq("-XstartOnFirstThread", "-d64")) | |
case _ => ("lib-win", Seq("-d64")) | |
} | |
println("Library dir: %s" format libDir) | |
val buildOrganization = "stochab" | |
val buildVersion = "0.1" | |
val buildScalaVersion = "2.9.1" | |
val deps = Seq( | |
"org.scalatest" %% "scalatest" % "1.6.1" % "test", | |
"org.eintr.loglady" %% "loglady" % "1.0.0", | |
"jfree" % "jfreechart-swt" % "1.0.8a") | |
val buildSettings = Defaults.defaultSettings ++ assemblySettings ++ Seq ( | |
organization := buildOrganization, | |
version := buildVersion, | |
scalaVersion := buildScalaVersion, | |
javaOptions := javaOpts, | |
fork := true, | |
libraryDependencies := deps, | |
mainClass in assembly := Some("stochab.Main"), | |
unmanagedBase <<= baseDirectory { base => base / libDir }) | |
lazy val main = Project ("Main", file("main"), settings = buildSettings) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment