-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
120 lines (100 loc) · 3.38 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
113
114
115
116
117
118
119
120
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / versionScheme := Some("early-semver")
name := "jackdaw"
organization := "de.djini"
version := "1.47.0"
scalaVersion := "3.5.0"
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-unchecked",
"-source:future",
"-Wunused:all",
"-Xfatal-warnings",
"-Xkind-projector:underscores",
)
libraryDependencies ++= Seq(
"de.djini" %% "scutil-jdk" % "0.250.0" % "compile",
"de.djini" %% "scutil-gui" % "0.250.0" % "compile",
"de.djini" %% "scaudio" % "0.258.0" % "compile",
"de.djini" %% "scjson-io" % "0.278.0" % "compile",
"de.djini" %% "screact" % "0.263.0" % "compile",
"de.djini" %% "sc2d" % "0.47.0" % "compile",
"de.djini" % "jkeyfinder" % "0.4.1" % "compile",
"javazoom" % "jlayer" % "1.0.1" % "compile",
"com.mpatric" % "mp3agic" % "0.9.1" % "compile",
"de.jarnbjo" % "j-ogg-all" % "1.0.0" % "compile"
)
wartremoverErrors ++= Seq(
Wart.StringPlusAny,
Wart.EitherProjectionPartial,
Wart.OptionPartial,
Wart.Enumeration,
Wart.FinalCaseClass,
Wart.JavaConversions,
Wart.Option2Iterable,
Wart.TryPartial
)
enablePlugins(BuildInfoPlugin, OsxAppPlugin, KapselPlugin, ScriptStartPlugin)
//------------------------------------------------------------------------------
buildInfoKeys := Seq[BuildInfoKey](name, version)
buildInfoPackage := "jackdaw"
//--------------------------------------------------------------------------------
val bootClass = "jackdaw.Boot"
val vmOptions = Seq(
"-server",
"-Xms64m",
"-Xmx64m",
"-XX:+UseG1GC",
// switch off access to /tmp/hsperfdata_$USER
"-XX:-UsePerfData",
"-XX:+PerfDisableSharedMem"
// full (mixed?) collections in G1 take far too long
// "-XX:+UnlockExperimentalVMOptions",
// "-XX:+UseG1GC",
// "-XX:MaxGCPauseMillis=10"
// "-XX:+PrintGCApplicationStoppedTime"
// "-XX:+PrintGCDetails",
)
val systemProperties = Map(
// java.lang.IllegalArgumentException: Comparison method violates its general contract!
// at java.util.TimSort.mergeHi(TimSort.java:868)
// ...
// at sun.awt.datatransfer.DataTransferer.setToSortedDataFlavorArray(DataTransferer.java:2407)
// @see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7193557
// @see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7173464
"java.util.Arrays.useLegacyMergeSort" -> "true",
// prevents memleaks for windows
"swing.bufferPerWindow" -> "false"
// debug rendering
// @see http://download.oracle.com/javase/1.5.0/docs/guide/2d/flags.html
// "sun.java2d.trace" -> "log"
// new xrender pipeline
// "sun.java2d.xrender" -> "True"
// crashes on too many systems, fbobject=false helps
// "sun.java2d.opengl" -> "True",
// "sun.java2d.opengl.fbobject" -> "false"
// allows jvisualvm
// "com.sun.management.jmxremote.local.only" -> "false"
)
// osxappBundleName := name.value
osxappBundleIcons := baseDirectory.value / "src/main/osxapp/default.icns"
osxappVm := JavaHomeVersion("11+")
osxappMainClass := Some(bootClass)
osxappVmOptions := vmOptions
osxappSystemProperties := systemProperties
kapselMainClass := Some(bootClass)
kapselVmOptions := vmOptions
kapselSystemProperties := systemProperties
kapselMakeExecutable := true
scriptstartConfigs := Seq(ScriptConfig(
scriptName = "jackdaw",
mainClass = bootClass,
vmOptions = vmOptions,
systemProperties = systemProperties
))
TaskKey[Seq[File]]("bundle") := Seq(
osxappZip.value,
kapsel.value,
scriptstart.value
)