-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
204 lines (160 loc) · 7.49 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
196
197
198
199
200
201
202
203
204
import sbt.Keys._
lazy val root = identity((project in file("."))
.enablePlugins(PlayScala, PlayNettyServer, DebianPlugin, SystemdPlugin, JavaServerAppPackaging))
.disablePlugins(PlayAkkaHttpServer)
name := "wlxjury"
organization := "org.intracer"
version := "0.13"
scalaVersion := "2.13.14"
val ScalikejdbcVersion = "4.3.0"
val ScalikejdbcPlayVersion = "3.0.1-scalikejdbc-4.3"
val ScalawikiVersion = "0.7.0-SNAPSHOT"
val PlayMailerVersion = "9.0.0"
val MockServerVersion = "5.7.0"
val playPac4jVersion = "12.0.0-PLAY2.9"
val pac4jVersion = "6.0.4.1"
val playVersion = "2.9.4"
resolvers += Resolver.bintrayRepo("intracer", "maven")
resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases"
resolvers += Resolver.jcenterRepo
resolvers += Resolver.mavenLocal
libraryDependencySchemes += "org.scala-lang.modules" %% "scala-parser-combinators" % "always"
libraryDependencies ++= Seq(
"org.webjars" %% "webjars-play" % "2.9.1",
"com.adrianhurt" %% "play-bootstrap" % "1.6.1-P28-B3",
"org.webjars" % "bootstrap" % "3.3.7-1" exclude("org.webjars", "jquery"),
"org.webjars" % "jquery" % "3.2.1",
"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" % "4.0.1",
"org.flywaydb" %% "flyway-play" % "8.0.1",
"org.flywaydb" % "flyway-mysql" % "9.16.3",
"mysql" % "mysql-connector-java" % "8.0.25",
"org.scalawiki" %% "scalawiki-core" % ScalawikiVersion,
"org.scalawiki" %% "scalawiki-wlx" % ScalawikiVersion,
"com.typesafe.akka" %% "akka-stream" % "2.6.20",
"com.typesafe.akka" %% "akka-http" % "10.1.10",
"org.pac4j" %% "play-pac4j" % playPac4jVersion,
"com.typesafe.play" %% "play-mailer" % PlayMailerVersion,
"com.typesafe.play" %% "play-mailer-guice" % PlayMailerVersion,
"com.github.tototoshi" %% "scala-csv" % "1.4.1",
"uk.org.lidalia" % "sysout-over-slf4j" % "1.0.2",
"javax.xml.bind" % "jaxb-api" % "2.3.1",
guice, filters,
specs2 % Test,
jdbc % Test,
"com.wix" % "wix-embedded-mysql" % "4.6.1" % Test,
"org.mock-server" % "mockserver-netty" % MockServerVersion % Test,
"net.java.dev.jna" % "jna" % "4.5.0" % Test,
"net.java.dev.jna" % "jna-platform" % "4.5.0" % Test
)
dependencyOverrides ++= Seq(
"commons-io" % "commons-io" % "2.16.1"
)
routesGenerator := InjectedRoutesGenerator
//doc in Compile <<= target.map(_ / "none")
Test / javaOptions += "-Dconfig.file=test/resources/application.conf"
Test / javaOptions += "-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]>"
Debian / debianPackageRecommends ++= Seq("virtual-mysql-server")
addCommandAlias(
"packageAll", "; clean" +
"; packageDebSystemV" +
"; clean " +
"; packageDebUpstart" +
"; clean " +
"; packageDebSystemd" +
"; 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 = (Debian / packageBin).value
IO.move(debianFile, output)
output
}
internalPackageDebianUpstart := {
val output = baseDirectory.value / "package" / s"wlxjury-upstart-${version.value}.deb"
val debianFile = (Debian / packageBin).value
IO.move(debianFile, output)
output
}
internalPackageDebianSystemd := {
val output = baseDirectory.value / "package" / s"wlxjury-systemd-${version.value}.deb"
val debianFile = (Debian / packageBin).value
IO.move(debianFile, output)
output
}
internalPackageRpmSystemV := {
val output = baseDirectory.value / "package" / s"wlxjury-systemv-${version.value}.rpm"
val rpmFile = (Rpm / packageBin).value
IO.move(rpmFile, output)
output
}
internalPackageRpmUpstart := {
val output = baseDirectory.value / "package" / s"wlxjury-upstart-${version.value}.rpm"
val rpmFile = (Rpm / packageBin).value
IO.move(rpmFile, output)
output
}
internalPackageRpmSystemd := {
val output = baseDirectory.value / "package" / s"wlxjury-systemd-${version.value}.rpm"
val rpmFile = (Rpm / packageBin).value
IO.move(rpmFile, output)
output
}