Skip to content

Commit 83df34c

Browse files
committed
mill 1.0
1 parent 11cd65e commit 83df34c

5 files changed

Lines changed: 91 additions & 79 deletions

File tree

.mill-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

build.mill

Lines changed: 23 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
1-
import os.copy.over
2-
import $ivy.`io.github.quafadas::millSite::0.0.24`
3-
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
4-
import $ivy.`com.goyeau::mill-scalafix::0.4.0`
5-
import $file.playwrightVersion // used to cache in GHA
1+
//| mill-version: 1.0.3
2+
//| mill-jvm-version: 21
3+
//| mvnDeps:
4+
//| - com.goyeau::mill-scalafix::0.6.0
5+
66

7-
import io.github.quafadas.millSite._
7+
import os.copy.over
8+
// import io.github.quafadas.millSite._
89
import mill._, scalalib._, publish._, scalanativelib._
910
import mill.scalalib.scalafmt.ScalafmtModule
10-
import de.tobiasroeser.mill.vcs.version._
11+
import mill.util.*
1112

1213
import com.goyeau.mill.scalafix.ScalafixModule
1314
import java.text.Format
1415

1516
object V{
1617
val scalaLts = "3.3.5"
17-
18+
val pwV = build.pwV
1819
val http4sVersion = "0.23.30"
1920
val circeVersion = "0.14.10"
21+
val scalaVersion = "3.7.2"
2022
}
2123

2224
trait FormatFix extends ScalafmtModule with ScalafixModule with ScalaModule
2325

2426
trait FormatFixPublish extends ScalaModule with FormatFix with PublishModule{
25-
override def scalaVersion = "3.6.4"
27+
override def scalaVersion = V.scalaVersion
2628

27-
override def scalacOptions: Target[Seq[String]] = super.scalacOptions() ++ Seq("-Wunused:all")
29+
override def scalacOptions = super.scalacOptions() ++ Seq("-Wunused:all")
2830

2931
def publishVersion = VcsVersion.vcsState().format()
3032

31-
override def pomSettings = T {
33+
override def pomSettings = Task {
3234
PomSettings(
3335
description = "An experimental live server for scala JS projects",
3436
organization = "io.github.quafadas",
@@ -46,79 +48,27 @@ trait FormatFixPublish extends ScalaModule with FormatFix with PublishModule{
4648

4749
trait Testy extends TestModule.Munit with FormatFix {
4850

49-
override def defaultCommandName(): String = "test"
50-
51-
def ivyDeps = super.ivyDeps() ++ sjsls.ivyDeps() ++ Seq(
52-
ivy"org.typelevel::munit-cats-effect::2.0.0",
53-
ivy"org.scalameta::munit::1.1.0",
54-
ivy"com.lihaoyi::os-lib:0.11.4"
55-
)
56-
57-
}
58-
59-
object routes extends FormatFixPublish {
51+
override def defaultTask(): String = "testForked"
6052

61-
def scalaVersion: T[String] = V.scalaLts
62-
63-
def ivyDeps = Agg(
64-
ivy"org.http4s::http4s-core:${V.http4sVersion}",
65-
ivy"org.http4s::http4s-client:${V.http4sVersion}",
66-
ivy"org.http4s::http4s-server:${V.http4sVersion}",
67-
ivy"org.http4s::http4s-dsl::${V.http4sVersion}",
68-
ivy"com.outr::scribe-cats::3.15.0"
53+
def mvnDeps = super.mvnDeps() ++ sjsls.mvnDeps() ++ Seq(
54+
mvn"org.typelevel::munit-cats-effect::2.0.0",
55+
mvn"org.scalameta::munit::1.1.0",
56+
mvn"com.lihaoyi::os-lib:0.11.4"
6957
)
7058

71-
override def artifactName = "frontend-routes"
72-
73-
object test extends Testy with ScalaTests{
74-
def ivyDeps = super.ivyDeps() ++ sjsls.ivyDeps()
75-
}
76-
7759
}
7860

79-
object sjsls extends FormatFixPublish {
80-
81-
override def scalaVersion = V.scalaLts
61+
// object site extends SiteModule {
8262

83-
def ivyDeps = super.ivyDeps() ++ Seq(
84-
ivy"org.http4s::http4s-ember-server::${V.http4sVersion}",
85-
ivy"org.http4s::http4s-ember-client::${V.http4sVersion}",
86-
ivy"org.http4s::http4s-scalatags::0.25.2",
87-
ivy"io.circe::circe-core::${V.circeVersion}",
88-
ivy"io.circe::circe-generic::${V.circeVersion}",
89-
ivy"co.fs2::fs2-io::3.11.0",
90-
ivy"com.lihaoyi::scalatags::0.13.1",
91-
ivy"com.monovore::decline::2.5.0",
92-
ivy"com.monovore::decline-effect::2.5.0",
63+
// def scalaVersion = sjsls.scalaVersion
9364

94-
)
95-
96-
def moduleDeps = Seq(routes)
97-
98-
def artifactName = "sjsls"
99-
100-
object test extends Testy with ScalaTests {
101-
def ivyDeps = super.ivyDeps() ++ sjsls.ivyDeps() ++ Seq(
102-
103-
ivy"com.microsoft.playwright:playwright:${playwrightVersion.pwV}",
104-
ivy"com.microsoft.playwright:driver-bundle:${playwrightVersion.pwV}"
105-
)
106-
}
107-
//def scalaNativeVersion = "0.4.17" // aspirational :-)
108-
109-
}
110-
111-
object site extends SiteModule {
112-
113-
def scalaVersion = sjsls.scalaVersion
114-
115-
override def moduleDeps = Seq(sjsls)
116-
}
65+
// override def moduleDeps = Seq(sjsls)
66+
// }
11767

11868
// SN deps which aren't yet there.
11969
/**
12070
1 targets failed
121-
project.resolvedIvyDeps
71+
project.resolvedmvnDeps
12272
Resolution failed for 2 modules:
12373
--------------------------------------------
12474
com.outr:scribe-cats_native0.4_3:3.13.5

mill

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# You can give the required mill version with --mill-version parameter
55
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
66
#
7-
# Original Project page: https://github.com/lefou/millw
8-
# Script Version: 0.4.12
7+
# Project page: https://github.com/lefou/millw
8+
# Script Version: 0.4.10
99
#
1010
# If you want to improve this script, please also contribute your changes back!
1111
#
@@ -14,7 +14,7 @@
1414
set -e
1515

1616
if [ -z "${DEFAULT_MILL_VERSION}" ] ; then
17-
DEFAULT_MILL_VERSION=0.12.5
17+
DEFAULT_MILL_VERSION="0.11.4"
1818
fi
1919

2020

@@ -49,9 +49,9 @@ fi
4949
# If not already set, read .mill-version file
5050
if [ -z "${MILL_VERSION}" ] ; then
5151
if [ -f ".mill-version" ] ; then
52-
MILL_VERSION="$(tr '\r' '\n' < .mill-version | head -n 1 2> /dev/null)"
52+
MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)"
5353
elif [ -f ".config/mill-version" ] ; then
54-
MILL_VERSION="$(tr '\r' '\n' < .config/mill-version | head -n 1 2> /dev/null)"
54+
MILL_VERSION="$(head -n 1 .config/mill-version 2> /dev/null)"
5555
fi
5656
fi
5757

routes/package.mill

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package build.routes
2+
3+
import build.*
4+
import mill._
5+
import mill.scalalib._
6+
import mill.scalalib.publish._
7+
8+
object `package` extends FormatFixPublish {
9+
10+
def scalaVersion: T[String] = V.scalaLts
11+
12+
def mvnDeps = Seq(
13+
mvn"org.http4s::http4s-core:${V.http4sVersion}",
14+
mvn"org.http4s::http4s-client:${V.http4sVersion}",
15+
mvn"org.http4s::http4s-server:${V.http4sVersion}",
16+
mvn"org.http4s::http4s-dsl::${V.http4sVersion}",
17+
mvn"com.outr::scribe-cats::3.15.0"
18+
)
19+
20+
override def artifactName = "frontend-routes"
21+
22+
object test extends Testy with ScalaTests{
23+
def mvnDeps = super.mvnDeps() ++ sjsls.mvnDeps()
24+
}
25+
26+
}

sjsls/package.mill

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package build.sjsls
2+
3+
import build.*
4+
import mill._
5+
import mill.scalalib._
6+
import mill.scalalib.publish._
7+
8+
object `package` extends FormatFixPublish {
9+
10+
override def scalaVersion = V.scalaLts
11+
12+
def mvnDeps = super.mvnDeps() ++ Seq(
13+
mvn"org.http4s::http4s-ember-server::${V.http4sVersion}",
14+
mvn"org.http4s::http4s-ember-client::${V.http4sVersion}",
15+
mvn"org.http4s::http4s-scalatags::0.25.2",
16+
mvn"io.circe::circe-core::${V.circeVersion}",
17+
mvn"io.circe::circe-generic::${V.circeVersion}",
18+
mvn"co.fs2::fs2-io::3.11.0",
19+
mvn"com.lihaoyi::scalatags::0.13.1",
20+
mvn"com.monovore::decline::2.5.0",
21+
mvn"com.monovore::decline-effect::2.5.0",
22+
23+
)
24+
25+
def moduleDeps = Seq(routes)
26+
27+
def artifactName = "sjsls"
28+
29+
object test extends Testy with ScalaTests {
30+
def mvnDeps = super.mvnDeps() ++ sjsls.mvnDeps() ++ Seq(
31+
mvn"com.microsoft.playwright:playwright:${V.pwV}",
32+
mvn"com.microsoft.playwright:driver-bundle:${V.pwV}"
33+
)
34+
}
35+
//def scalaNativeVersion = "0.4.17" // aspirational :-)
36+
37+
}

0 commit comments

Comments
 (0)