forked from intracer/wlxjury
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
195 lines (151 loc) · 7.13 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
import sbt.Keys._
lazy val root = identity((project in file("."))
.enablePlugins(PlayScala, DebianPlugin, RpmPlugin, JavaAppPackaging))
name := "wlxjury"
organization := "org.intracer"
version := "0.11-SNAPSHOT"
scalaVersion := "2.12.6"
val ScalikejdbcVersion = "3.2.2"
val ScalikejdbcPlayVersion = "2.6.0-scalikejdbc-3.2"
val ScalawikiVersion = "0.5.0"
val PlayMailerVersion = "6.0.1"
resolvers += Resolver.bintrayRepo("intracer", "maven")
resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases"
resolvers += Resolver.jcenterRepo
libraryDependencies ++= Seq(
"org.webjars" %% "webjars-play" % "2.6.3",
"com.adrianhurt" %% "play-bootstrap" % "1.2-P26-B3",
"org.webjars" % "bootstrap" % "3.3.7-1" exclude("org.webjars", "jquery"),
"org.webjars" % "jquery" % "3.2.1",
"mysql" % "mysql-connector-java" % "5.1.40",
"org.scalikejdbc" %% "scalikejdbc" % ScalikejdbcVersion,
"org.scalikejdbc" %% "scalikejdbc-config" % ScalikejdbcVersion,
"org.scalikejdbc" %% "scalikejdbc-play-initializer" % ScalikejdbcPlayVersion,
"org.scalikejdbc" %% "scalikejdbc-play-dbapi-adapter" % ScalikejdbcPlayVersion,
"org.scalikejdbc" %% "scalikejdbc-play-fixture" % ScalikejdbcPlayVersion,
"org.skinny-framework" %% "skinny-orm" % "2.5.2",
"org.flywaydb" %% "flyway-play" % "4.0.0",
"org.scalawiki" %% "scalawiki-core" % ScalawikiVersion,
"org.scalawiki" %% "scalawiki-wlx" % ScalawikiVersion,
"com.typesafe.akka" %% "akka-stream" % "2.5.11",
"com.typesafe.akka" %% "akka-http" % "10.0.13",
"nl.grons" %% "metrics-scala" % "3.5.9",
"com.typesafe.play" %% "play-mailer" % PlayMailerVersion,
"com.typesafe.play" %% "play-mailer-guice" % PlayMailerVersion,
"com.github.tototoshi" %% "scala-csv" % "1.3.4",
"uk.org.lidalia" % "sysout-over-slf4j" % "1.0.2",
guice, filters,
specs2 % Test,
jdbc % Test,
"com.wix" % "wix-embedded-mysql" % "4.2.0" % Test,
"net.java.dev.jna" % "jna" % "4.5.0" % Test,
"net.java.dev.jna" % "jna-platform" % "4.5.0" % Test,
"com.h2database" % "h2" % "1.4.193" % Test)
dependencyOverrides ++= Seq(
"commons-io" % "commons-io" % "2.5"
)
routesGenerator := StaticRoutesGenerator
//doc in Compile <<= target.map(_ / "none")
javaOptions in Test += "-Dconfig.file=test/resources/application.conf"
javaOptions in Test += "-Djna.nosys=true"
//rpmRelease := "1"
rpmRequirements ++= Seq("java-1.8.0-openjdk", "bash")
rpmVendor := "intracer"
rpmUrl := Some("https://github.com/intracer/wlxjury")
rpmLicense := Some("ASL 2.0")
packageSummary := "WLX Jury Tool is an image selection and rating tool for Wiki Loves Monuments and Wiki Loves Earth contests"
packageDescription :=
"""On gallery page jurors or organizing committee can browse the images, see the rating or selection status of each image, open large image view page.
|Images can be filtered by their status - unrated, and selected or rejected in selection rounds or rated in rating rounds.
|In rating rounds images are sorted by their rating.
|Organizing committee can see the votes of each juror separately or the overall rating of all jurors together.
|In large image view there is vertical ribbon of image thumbnails on the left and large currently viewed image on the right.
|User can go backward or forward with navigation buttons or arrow keys on the keyboard, or can click the thumbnails in the ribbon
|Juror can select, reject or rate the currently viewed image.
|Juror can also comment the image and see other jurors comments.
|Organizing committee can see the ratings and comments given by all jurors to the image.
|From large image view one can return to gallery view, visit image page on commons by clicking the large image, or open full resolution version of the image. Caption of the full resolution image version link shows image resolution.
""".stripMargin.replace('\n', ' ')
maintainer := "Ilya Korniiko <[email protected]>"
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
}