-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
172 lines (131 loc) · 5.39 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name := "finance"
version := "0.8"
scalacOptions += "-target:jvm-1.8"
scalaVersion := "2.12.6"
val scalawikiVersion = "0.5.0"
resolvers ++= Seq(
Resolver.jcenterRepo,
Resolver.typesafeRepo("releases"),
Resolver.bintrayRepo("intracer", "maven")
)
libraryDependencies ++= Seq(
"com.mohiva" %% "play-silhouette" % "5.0.6",
"com.mohiva" %% "play-silhouette-crypto-jca" % "5.0.6",
"com.iheart" %% "ficus" % "1.4.3",
"net.codingwell" %% "scala-guice" % "4.1.0",
"org.sweble.wikitext" % "swc-engine" % "2.0.0",
"com.typesafe.slick" %% "slick" % "3.1.1",
"ch.qos.logback" % "logback-classic" % "1.1.3",
"com.h2database" % "h2" % "1.4.187",
"org.scalawiki" %% "scalawiki-core" % scalawikiVersion,
"com.github.tototoshi" %% "scala-csv" % "1.3.4",
"com.adrianhurt" %% "play-bootstrap" % "1.2-P26-B3",
"com.typesafe.play" %% "play-slick" % "3.0.3",
"com.typesafe.play" %% "play-slick-evolutions" % "3.0.3",
"com.typesafe.play" %% "play-mailer" % "6.0.1",
"com.typesafe.slick" %% "slick" % "3.2.3",
"com.typesafe.slick" %% "slick-hikaricp" % "3.2.3",
guice,
"io.spray" % "spray-util_2.11" % "1.3.3",
"joda-time" % "joda-time" % "2.7",
"jp.ne.opt" %% "chronoscala" % "0.2.1",
"mysql" % "mysql-connector-java" % "5.1.35",
"com.google.jimfs" % "jimfs" % "1.0" % "test",
"com.typesafe.play" %% "play-specs2" % "2.6.15" % "test",
"org.seleniumhq.selenium" % "selenium-java" % "2.53.1" % "test",
"com.mohiva" %% "play-silhouette-testkit" % "5.0.6" % "test"
)
lazy val root = (project in file(".")).enablePlugins(PlayScala)
//(managedClasspath in IntegrationTest) += (packageBin in Assets).value
// workaround for https://youtrack.jetbrains.com/issue/SCL-11141
// unmanagedResourceDirectories in Test <+= baseDirectory ( _ /"target/web/public/test" )
organization := "org.intracer"
rpmVendor := "intracer"
rpmUrl := Some("https://github.com/intracer/finance")
rpmLicense := Some("ASL 2.0")
packageSummary := "finance tool"
packageDescription := """finance tool""".stripMargin.replace('\n', ' ')
maintainer := "Ilya Korniiko <[email protected]>"
routesGenerator := StaticRoutesGenerator
debianPackageDependencies in Debian ++= Seq("java8-runtime")
debianPackageRecommends in Debian ++= Seq("virtual-mysql-server")
addCommandAlias(
"packageAll", "; clean" +
"; packageDebianSystemV" +
"; clean " +
"; packageDebianUpstart" +
"; clean " +
"; packageDebianSystemd" +
"; clean " +
"; packageRpmSystemV" +
"; clean " +
"; packageRpmUpstart" +
"; clean " +
"; packageRpmSystemd"
)
addCommandAlias(
"packageDebSystemV", "; set serverLoading in Debian := Some(com.typesafe.sbt.packager.archetypes.systemloader.ServerLoader.SystemV)" +
"; internalPackageDebianSystemV"
)
addCommandAlias(
"packageDebUpstart", "; set serverLoading in Debian := Some(com.typesafe.sbt.packager.archetypes.systemloader.ServerLoader.Upstart)" +
"; internalPackageDebianUpstart"
)
addCommandAlias(
"packageDebSystemd", "; set serverLoading in Debian := Some(com.typesafe.sbt.packager.archetypes.systemloader.ServerLoader.Systemd)" +
"; internalPackageDebianSystemd"
)
addCommandAlias(
"packageRpmSystemV", "; set serverLoading in Rpm := Some(com.typesafe.sbt.packager.archetypes.systemloader.ServerLoader.SystemV)" +
"; internalPackageRpmSystemV"
)
addCommandAlias(
"packageRpmUpstart", "; set serverLoading in Rpm := Some(com.typesafe.sbt.packager.archetypes.systemloader.ServerLoader.Upstart)" +
"; internalPackageRpmUpstart"
)
addCommandAlias(
"packageRpmSystemd", "; set serverLoading in Rpm := Some(com.typesafe.sbt.packager.archetypes.systemloader.ServerLoader.Systemd)" +
"; internalPackageRpmSystemd"
)
lazy val internalPackageDebianSystemV = taskKey[File]("creates debian package with systemv")
lazy val internalPackageDebianUpstart = taskKey[File]("creates debian package with upstart")
lazy val internalPackageDebianSystemd = taskKey[File]("creates debian package with systemd")
lazy val internalPackageRpmSystemV = taskKey[File]("creates rpm package with systemv")
lazy val internalPackageRpmUpstart = taskKey[File]("creates rpm package with upstart")
lazy val internalPackageRpmSystemd = taskKey[File]("creates rpm package with systemd")
internalPackageDebianSystemV := {
val output = baseDirectory.value / "package" / s"wlxjury-systemv-${version.value}.deb"
val debianFile = (packageBin in Debian).value
IO.move(debianFile, output)
output
}
internalPackageDebianUpstart := {
val output = baseDirectory.value / "package" / s"wlxjury-upstart-${version.value}.deb"
val debianFile = (packageBin in Debian).value
IO.move(debianFile, output)
output
}
internalPackageDebianSystemd := {
val output = baseDirectory.value / "package" / s"wlxjury-systemd-${version.value}.deb"
val debianFile = (packageBin in Debian).value
IO.move(debianFile, output)
output
}
internalPackageRpmSystemV := {
val output = baseDirectory.value / "package" / s"wlxjury-systemv-${version.value}.rpm"
val rpmFile = (packageBin in Rpm).value
IO.move(rpmFile, output)
output
}
internalPackageRpmUpstart := {
val output = baseDirectory.value / "package" / s"wlxjury-upstart-${version.value}.rpm"
val rpmFile = (packageBin in Rpm).value
IO.move(rpmFile, output)
output
}
internalPackageRpmSystemd := {
val output = baseDirectory.value / "package" / s"wlxjury-systemd-${version.value}.rpm"
val rpmFile = (packageBin in Rpm).value
IO.move(rpmFile, output)
output
}