-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
51 lines (38 loc) · 1.6 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
name := "NESSE"
version := "1.1"
scalaVersion := "3.2.2"
scalacOptions ++= Seq(
"-language:postfixOps",
"-encoding","ISO-8859-1",
"-deprecation"
)
libraryDependencies += "com.formdev" % "flatlaf" % "3.0"
libraryDependencies += "com.fifesoft" % "rsyntaxtextarea" % "3.3.1"
libraryDependencies += "com.jgoodies" % "jgoodies-forms" % "1.9.0"
libraryDependencies += "net.java.jinput" % "jinput" % "2.0.9"
libraryDependencies += "org.yaml" % "snakeyaml" % "2.0"
enablePlugins(JavaAppPackaging)
// Generates Version.scala
Compile / sourceGenerators += Def.task {
val file = (Compile / scalaSource).value / "ucesoft" / "nes" / "Version.scala"
println(s"Generating Version.scala $file")
IO.write(file,
s"""package ucesoft.nes
|object Version {
| val VERSION = "${version.value}"
| val SCALA_VERSION = "${scalaVersion.value}"
| val BUILD_DATE = "${java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss"))}"
|}
|""".stripMargin)
Seq(file)
}.taskValue
maintainer := "[email protected]"
// main class to run
Compile / mainClass := Some("ucesoft.nes.ui.NESUI")
Compile / discoveredMainClasses := Seq()
Universal / javaOptions ++= Seq("-J-Xmx128M", "-J-Xms128M", "-J-server")
batScriptExtraDefines += """set _JAVA_OPTS=%_JAVA_OPTS% -Djava.library.path=%APP_LIB_DIR%"""
bashScriptExtraDefines += """addJava "-Djava.library.path=${app_home}/../lib""""
batScriptExtraDefines += """set _JAVA_OPTS=%_JAVA_OPTS% -Dnesse.home=%APP_HOME%"""
bashScriptExtraDefines += """addJava "-Dnesse.home=${app_home}/../""""
// Universal / packageBin