forked from NetLogo/NetLogo
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
112 lines (80 loc) · 3.77 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
scalaVersion := "2.9.2"
name := "NetLogo"
onLoadMessage := ""
resourceDirectory in Compile <<= baseDirectory(_ / "resources")
scalacOptions ++=
"-deprecation -unchecked -Xfatal-warnings -Xcheckinit -encoding us-ascii"
.split(" ").toSeq
javacOptions ++=
"-bootclasspath dist/java5/classes.jar%sdist/java5/ui.jar -g -deprecation -encoding us-ascii -Werror -Xlint:all -Xlint:-serial -Xlint:-fallthrough -Xlint:-path -source 1.5 -target 1.5"
.format(java.io.File.pathSeparator)
.split(" ").toSeq
// only log problems plz
ivyLoggingLevel := UpdateLogging.Quiet
// this makes jar-building and script-writing easier
retrieveManaged := true
// we're not cross-building for different Scala versions
crossPaths := false
scalaSource in Compile <<= baseDirectory(_ / "src" / "main")
scalaSource in Test <<= baseDirectory(_ / "src" / "test")
javaSource in Compile <<= baseDirectory(_ / "src" / "main")
javaSource in Test <<= baseDirectory(_ / "src" / "test")
unmanagedSourceDirectories in Test <+= baseDirectory(_ / "src" / "tools")
unmanagedResourceDirectories in Compile <+= baseDirectory { _ / "resources" }
mainClass in (Compile, run) := Some("org.nlogo.app.App")
javaOptions in run ++= (
if (System.getProperty("os.name").contains("Mac"))
Seq(
"-Dapple.awt.graphics.UseQuartz=true",
"-Dnetlogo.quaqua.laf=ch.randelshofer.quaqua.snowleopard.Quaqua16SnowLeopardLookAndFeel",
"-Dapple.awt.showGrowBox=true",
"-Dapple.laf.useScreenMenuBar=true")
else
Seq())
fork in (Compile, run) := true
javaHome in (Compile, run) := (
if (System.getProperty("os.name").contains("Mac"))
Some(file(Process(Seq("/usr/libexec/java_home", "-v", "1.8")).!!.dropRight(1)))
else
None)
mainClass in (Compile, packageBin) := Some("org.nlogo.app.App")
sourceGenerators in Compile <+= EventsGenerator.task
sourceGenerators in Compile <+= JFlexRunner.task
resourceGenerators in Compile <+= I18n.resourceGeneratorTask
Extensions.extensionsTask
InfoTab.infoTabTask
ModelIndex.modelIndexTask
NativeLibs.nativeLibsTask
Depend.dependTask
threed := { System.setProperty("org.nlogo.is3d", "true") }
nogen := { System.setProperty("org.nlogo.noGenerator", "true") }
libraryDependencies ++= Seq(
"asm" % "asm-all" % "3.3.1",
"org.picocontainer" % "picocontainer" % "2.13.6",
"log4j" % "log4j" % "1.2.16",
"javax.media" % "jmf" % "2.1.1e",
"org.pegdown" % "pegdown" % "1.1.0",
"org.parboiled" % "parboiled-java" % "1.0.2",
"steveroy" % "mrjadapter" % "1.2" from "http://ccl-artifacts.s3-website-us-east-1.amazonaws.com/mrjadapter-1.2.jar",
"org.jhotdraw" % "jhotdraw" % "6.0b1" from "http://ccl-artifacts.s3-website-us-east-1.amazonaws.com/jhotdraw-6.0b1.jar",
"ch.randelshofer" % "quaqua" % "9.1" from "http://ccl-artifacts.s3-website-us-east-1.amazonaws.com/quaqua-9.1.jar",
"ch.randelshofer" % "swing-layout" % "9.1" from "http://ccl-artifacts.s3-website-us-east-1.amazonaws.com/swing-layout-9.1.jar",
"com.jogamp" % "jogl" % "2.3.2" from "http://ccl-artifacts.s3-website-us-east-1.amazonaws.com/jogl-all-2.3.2.jar",
"com.jogamp" % "gluegen-rt" % "2.3.2" from "http://ccl-artifacts.s3-website-us-east-1.amazonaws.com/gluegen-rt-2.3.2.jar",
"org.jmock" % "jmock" % "2.5.1" % "test",
"org.jmock" % "jmock-legacy" % "2.5.1" % "test",
"org.jmock" % "jmock-junit4" % "2.5.1" % "test",
"org.scalacheck" %% "scalacheck" % "1.10.0" % "test",
"org.scalatest" %% "scalatest" % "1.8" % "test",
"org.apache.httpcomponents" % "httpclient" % "4.2",
"org.apache.httpcomponents" % "httpmime" % "4.2",
"com.googlecode.json-simple" % "json-simple" % "1.1.1"
)
all <<= (streams) map { (s) => }
all <<= all.dependsOn(
packageBin in Test,
Extensions.extensions,
NativeLibs.nativeLibs,
ModelIndex.modelIndex,
InfoTab.infoTab,
Scaladoc.docSmaller)