| author | Tomas Zeman <tzeman@volny.cz> |
| Thu, 22 Nov 2018 13:15:29 +0100 | |
| changeset 3 | 48479e4b89d4 |
| parent 2 | eb0fb99d0289 |
| child 4 | 1a1347e8c5be |
| permissions | -rw-r--r-- |
| 1 | 1 |
import java.io.File |
2 |
||
3 |
import ammonite.ops._ |
|
4 |
import coursier.maven.MavenRepository |
|
5 |
import mill._ |
|
6 |
import mill.define.{Command, Input, Sources, Target}
|
|
7 |
import mill.scalajslib._ |
|
8 |
import mill.scalalib._ |
|
9 |
import mill.scalalib.publish._ |
|
|
2
eb0fb99d0289
Ignore idea_modules, added scalatags dep.
Tomas Zeman <tzeman@volny.cz>
parents:
1
diff
changeset
|
10 |
import mill.util.Loose |
| 1 | 11 |
|
12 |
import scala.sys |
|
13 |
||
14 |
val appVersion = "18.12-SNAPSHOT" |
|
15 |
||
16 |
val scalaJsVer = "0.6.25" |
|
17 |
val scalaVer = "2.12.7" |
|
18 |
val akkaVer = "2.4.20" |
|
19 |
||
20 |
trait Common extends ScalaModule with PublishModule {
|
|
21 |
val scalaVersion = scalaVer |
|
22 |
||
23 |
def publishVersion = appVersion |
|
24 |
||
25 |
def pomSettings = PomSettings( |
|
26 |
description = "Content management system for SQWL", |
|
27 |
organization = "net.tz", |
|
28 |
url = "http://kvalitapracovnihozivota.vubp.cz", |
|
29 |
licenses = Seq(License.`Apache-2.0`), |
|
30 |
versionControl = VersionControl(developerConnection = Some( |
|
31 |
"ssh://hg@bitbucket.org/tzeman/sqwl-cms")), |
|
32 |
developers = Seq( |
|
33 |
Developer("tzeman", "Tomas Zeman", "")
|
|
34 |
) |
|
35 |
) |
|
36 |
||
37 |
override def artifactName = T{
|
|
38 |
super.artifactName.map(_.flatMap(c => |
|
39 |
if (c.isUpper) Seq('-', c.toLower) else Seq(c) ))
|
|
40 |
} |
|
41 |
||
42 |
override def scalacOptions = T{Seq(
|
|
43 |
"-deprecation", // Emit warning and location for usages of deprecated APIs. |
|
44 |
"-encoding", "utf-8", // Specify character encoding used by source files. |
|
45 |
"-explaintypes", // Explain type errors in more detail. |
|
46 |
"-feature", // Emit warning and location for usages of features that should be imported explicitly. |
|
47 |
"-language:higherKinds", // Allow higher-kinded types |
|
48 |
"-language:implicitConversions", // Allow definition of implicit functions called views |
|
49 |
"-language:reflectiveCalls", |
|
50 |
"-language:postfixOps", |
|
51 |
"-unchecked", // Enable additional warnings where generated code depends on assumptions. |
|
52 |
"-Xcheckinit", // Wrap field accessors to throw an exception on uninitialized access. |
|
53 |
"-Xfuture", // Turn on future language features. |
|
54 |
"-target:jvm-1.8", |
|
55 |
)} |
|
56 |
} |
|
57 |
||
58 |
object jvm extends Common {
|
|
|
2
eb0fb99d0289
Ignore idea_modules, added scalatags dep.
Tomas Zeman <tzeman@volny.cz>
parents:
1
diff
changeset
|
59 |
override def scalacPluginIvyDeps: Target[Loose.Agg[Dep]] = super.scalacPluginIvyDeps() ++ Agg( |
| 1 | 60 |
ivy"org.scalamacros:::paradise:2.1.0" |
61 |
) |
|
62 |
||
63 |
override def ivyDeps = Agg( |
|
64 |
ivy"com.wacai::config-annotation:0.3.6", |
|
65 |
ivy"de.heikoseeberger::akka-http-json4s:1.22.0", |
|
66 |
ivy"com.typesafe.akka::akka-slf4j:$akkaVer", |
|
67 |
ivy"org.json4s::json4s-native:3.6.2", |
|
|
2
eb0fb99d0289
Ignore idea_modules, added scalatags dep.
Tomas Zeman <tzeman@volny.cz>
parents:
1
diff
changeset
|
68 |
ivy"ch.qos.logback:logback-classic:1.2.3", |
| 3 | 69 |
ivy"com.lihaoyi::scalatags:0.6.7", |
70 |
ivy"org.webjars:bootstrap:4.1.3", |
|
71 |
ivy"org.webjars:font-awesome:5.5.0" |
|
| 1 | 72 |
) |
73 |
||
74 |
override def scalacOptions = T{super.scalacOptions.map(_ :+
|
|
| 3 | 75 |
"-Xmacro-settings:conf.output.dir=jvm/resources" |
| 1 | 76 |
)} |
77 |
||
78 |
override def mainClass = Some("sqwl.cms.Server")
|
|
79 |
||
80 |
} |
|
81 |
||
82 |
object js extends Common with ScalaJSModule {
|
|
83 |
def scalaJSVersion: Target[String] = scalaJsVer |
|
84 |
} |
|
85 |
||
86 |
// vim: et ts=2 sw=2 syn=scala |