This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
71 lines (58 loc) · 2.4 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
//
// Copyright © 2014 Associated Universities, Inc. Washington DC, USA.
//
// This file is part of vlitesim.
//
// vlitesim is free software: you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the Free Software
// Foundation, either version 3 of the License, or (at your option) any later
// version.
//
// vlitesim is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
// A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// vlitesim. If not, see <http://www.gnu.org/licenses/>.
//
import com.typesafe.sbt.packager.Keys._
import com.typesafe.sbt.SbtNativePackager._
name := """vlitesim"""
version := "1.4"
scalaVersion := "2.10.3"
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % "2.2.4",
"com.typesafe.akka" %% "akka-remote" % "2.2.4",
"com.typesafe.akka" %% "akka-kernel" % "2.2.4",
"joda-time" % "joda-time" % "2.3",
"org.joda" % "joda-convert" % "1.5",
"com.typesafe" % "config" % "1.2.0",
"com.typesafe.akka" %% "akka-testkit" % "2.2.4" % "test",
"org.scalatest" %% "scalatest" % "2.0" % "test",
"junit" % "junit" % "4.11" % "test",
"com.novocode" % "junit-interface" % "0.10" % "test"
)
packageArchetype.java_application
scalacOptions ++= Seq("-deprecation")
testOptions += Tests.Argument(TestFrameworks.JUnit, "-v")
mainClass in Compile := Some("akka.kernel.Main")
bashScriptConfigLocation := Some("${app_home}/../conf/scriptargs")
bashScriptExtraDefines ++= Seq(
"""addApp "edu.nrao.vlite.Simulator"""",
"""addJava "-Dakka.home=${app_home}/.."""",
"""addJava "-Dakka.remote.netty.tcp.hostname=${VLITE_HOSTNAME:-$HOSTNAME}"""",
"""addJava "-Dconfig.file=${app_home}/../conf/application.conf"""",
"""export LD_LIBRARY_PATH=${app_home}/../lib"""
)
val downloadLicense = taskKey[File]("Downloads the license file.")
downloadLicense := {
val location = target.value / "downloads" / "GPLv3"
location.getParentFile.mkdirs()
IO.download(url("https://www.gnu.org/licenses/gpl-3.0.txt"), location)
location
}
mappings in Universal ++= {
((file("src/main/resources") * "*").get map { f => f -> ("conf/" + f.name) }) ++
((file("bin") * "*").get map { f => f -> ("bin/" + f.name) }) :+
(downloadLicense.value -> "COPYING")
}