--- a/build.sc Fri Mar 08 16:08:11 2019 +0100
+++ b/build.sc Tue Nov 24 10:49:12 2020 +0100
@@ -1,16 +1,17 @@
import ammonite.ops._
import mill._
+import mill.api.Loose
import mill.define.{Input, Sources, Target}
import mill.scalajslib._
import mill.scalalib._
import mill.scalalib.publish._
-import mill.util.Loose
-val appVersion = "19.03"
+val appVersion = "20.12-SNAPSHOT"
-val scalaJsVer = "0.6.25"
-val scalaVer = "2.12.7"
-val akkaVer = "2.4.20"
+val scalaJsVer = "0.6.33"
+val scalaVer = "2.12.12"
+val akkaVer = "2.6.10"
+val akkaHttp = "10.2.1"
trait Common extends ScalaModule with PublishModule {
val scalaVersion = scalaVer
@@ -19,19 +20,19 @@
def pomSettings = PomSettings(
description = "Content management system for SQWL",
- organization = "net.tz",
+ organization = "cz.functionals",
url = "http://kvalitapracovnihozivota.vubp.cz",
licenses = Seq(License.`Apache-2.0`),
versionControl = VersionControl(developerConnection = Some(
- "ssh://hg@bitbucket.org/tzeman/sqwl-cms")),
+ "ssh://tzeman@hg.functionals.cz/repos/public/sqwl-cms")),
developers = Seq(
Developer("tzeman", "Tomas Zeman", "")
)
)
- override def artifactName = T{
- super.artifactName.map(_.flatMap(c =>
- if (c.isUpper) Seq('-', c.toLower) else Seq(c) ))
+ override def artifactName: Target[String] = T{
+ super.artifactName().flatMap(c =>
+ if (c.isUpper) Seq('-', c.toLower) else Seq(c)).mkString
}
override def scalacOptions = T{Seq(
@@ -46,19 +47,19 @@
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
"-Xcheckinit", // Wrap field accessors to throw an exception on uninitialized access.
"-Xfuture", // Turn on future language features.
- "-target:jvm-1.8",
+ "-target:jvm-1.8"
)}
def hgId: Input[String] = T.input {
- os.proc("hg", "id", "-i").call().out.string.trim
+ os.proc("hg", "id", "-i").call().out.trim
}
def hgNum: Input[String] = T.input {
- os.proc("hg", "id", "-n").call().out.string.trim
+ os.proc("hg", "id", "-n").call().out.trim
}
def hgTag: Input[Option[String]] = T.input {
- os.proc("hg", "id", "-t").call().out.string.trim.split(' ').headOption
+ os.proc("hg", "id", "-t").call().out.trim.split(' ').headOption
}
}
@@ -73,13 +74,14 @@
object base extends Common with Versions {
override def scalacPluginIvyDeps: Target[Loose.Agg[Dep]] =
super.scalacPluginIvyDeps() ++ Agg(
- ivy"org.scalamacros:::paradise:2.1.0"
+ ivy"org.scalamacros:::paradise:2.1.1"
)
override def ivyDeps = Agg(
ivy"com.wacai::config-annotation:0.3.6",
- ivy"de.heikoseeberger::akka-http-json4s:1.22.0",
+ ivy"com.typesafe.akka::akka-http:$akkaHttp",
ivy"com.typesafe.akka::akka-slf4j:$akkaVer",
+ ivy"com.typesafe.akka::akka-stream:$akkaVer",
ivy"org.json4s::json4s-native:3.6.2",
ivy"ch.qos.logback:logback-classic:1.2.3",
ivy"com.lihaoyi::scalatags:0.6.7",
@@ -122,8 +124,8 @@
override def generatedSources: Target[Seq[PathRef]] = T{
val dir = T.ctx().dest
val src = contentSources() map(_.path)
- val ids = src flatMap(ls! _ filter(_.name endsWith ".scalatex") map { p =>
- val id = p.name replaceAllLiterally (".scalatex", "")
+ val ids = src flatMap(ls! _ filter(_.ext endsWith "scalatex") map { p =>
+ val id = p.last replaceAllLiterally (".scalatex", "")
val aid = s"article-$id"
write(dir / s"$id.scala",
s"""
@@ -139,7 +141,7 @@
| }
|
|/*
- |${os.read(p).lines mkString "\n"}
+ |${os.read(p)}
|*/
""".stripMargin)
aid
@@ -166,7 +168,7 @@
Seq(PathRef(dir))
}
- override def mainClass = Some("sqwl.cms.Main")
+ override def mainClass: T[Option[String]] = Some("sqwl.cms.Main")
override def ivyDeps = Agg(
ivy"com.beachape::enumeratum:1.5.13"
@@ -196,7 +198,7 @@
T.sources{ millSourcePath / up / 'production / 'content }
def hgProdId: Input[String] = T.input {
- os.proc("hg", "id", "-i", "--cwd", "production").call().out.string.trim
+ os.proc("hg", "id", "-i", "--cwd", "production").call().out.trim
}
override def assemblyName: Target[String] = T{