Skip to content

Commit 416dc20

Browse files
committed
Upgrade mill to 1.1.x
1 parent 189e2c8 commit 416dc20

3 files changed

Lines changed: 326 additions & 57 deletions

File tree

.mill-version

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

build.mill

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
//| mill-version: 1.1.4
2+
//| mvnDeps: ["com.github.lolgab::mill-mima::0.2.1"]
3+
14
package build
25
import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
3-
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
4-
import de.tobiasroeser.mill.vcs.version.VcsVersion
5-
import $ivy.`com.github.lolgab::mill-mima::0.1.1`
6+
import mill.util.VcsVersion
67
import com.github.lolgab.mill.mima._
7-
import mill.scalalib.api.ZincWorkerUtil.isScala3
88

99
val communityBuildDottyVersion = sys.props.get("dottyVersion").toList
1010

@@ -41,49 +41,47 @@ object castor extends Module {
4141
)
4242

4343
def artifactName = "castor"
44-
def millSourcePath = super.millSourcePath / os.up
44+
def moduleDir = super.moduleDir / os.up
4545

46-
def sources = T.sources(
47-
millSourcePath / "src",
48-
millSourcePath / s"src-$platformSegment"
46+
def sources = Task.Sources(
47+
moduleDir / "src",
48+
moduleDir / s"src-$platformSegment"
4949
)
5050

51-
def ivyDeps = Agg(ivy"com.lihaoyi::sourcecode::0.4.1")
51+
def mvnDeps = Seq(mvn"com.lihaoyi::sourcecode::0.4.1")
5252
}
5353
trait ActorTestModule extends ScalaModule with TestModule.Utest with PlatformModule {
54-
def sources = T.sources(
55-
millSourcePath / "src",
56-
millSourcePath / s"src-$platformSegment"
54+
def sources = Task.Sources(
55+
moduleDir / "src",
56+
moduleDir / s"src-$platformSegment"
5757
)
58-
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.8.3")
58+
def mvnDeps = Seq(mvn"com.lihaoyi::utest::0.8.3")
5959
}
6060

6161
object js extends Cross[ActorJsModule](scalaVersions)
6262
trait ActorJsModule extends ActorModule with ScalaJSModule {
6363
def scalaJSVersion = "1.16.0"
64-
override def sources = T.sources {
65-
super.sources() ++ Seq(PathRef(millSourcePath / "src-js-native"))
66-
}
64+
def jsNativeSources = Task.Sources(moduleDir / "src-js-native")
65+
override def sources = Task { super.sources() ++ jsNativeSources() }
6766
object test extends ScalaJSTests with ActorTestModule {
6867
def scalaVersion = crossScalaVersion
6968
}
7069
}
7170
object jvm extends Cross[ActorJvmModule](scalaVersions)
7271
trait ActorJvmModule extends ActorModule {
7372
object test extends ScalaTests with ActorTestModule{
74-
def ivyDeps = super.ivyDeps() ++ Agg(
75-
ivy"com.lihaoyi::os-lib:0.9.1"
73+
def mvnDeps = super.mvnDeps() ++ Seq(
74+
mvn"com.lihaoyi::os-lib:0.9.1"
7675
)
7776
}
7877
}
7978
object native extends Cross[ActorNativeModule](scalaVersions)
8079
trait ActorNativeModule extends ActorModule with ScalaNativeModule {
8180
def scalaNativeVersion = "0.5.4"
8281
// Enable after first release for Scala Native 0.5
83-
def mimaPreviousArtifacts = T { Agg.empty }
84-
override def sources = T.sources {
85-
super.sources() ++ Seq(PathRef(millSourcePath / "src-js-native"))
86-
}
82+
def mimaPreviousArtifacts = Task { Seq.empty }
83+
def jsNativeSources = Task.Sources(moduleDir / "src-js-native")
84+
override def sources = Task { super.sources() ++ jsNativeSources() }
8785
object test extends ScalaNativeTests with ActorTestModule
8886
}
8987
}

0 commit comments

Comments
 (0)