@@ -52,7 +52,8 @@ object Deps {
5252 // The Scala version to use
5353 // When updating, run "Publish Bridges" Github Actions for the new version
5454 // and then add to it `bridgeScalaVersions`
55- val scalaVersion = "2.13.14"
55+ val scalaVersion = "3.5.0"
56+ val scala2Version = "2.13.14"
5657 // Scoverage 1.x will not get releases for newer Scala versions
5758 val scalaVersionForScoverageWorker1 = "2.13.8"
5859 // The Scala 2.12.x version to use for some workers
@@ -67,14 +68,14 @@ object Deps {
6768
6869 object Scalajs_1 {
6970 val scalaJsVersion = "1.16.0"
70- val scalajsEnvJsdomNodejs = ivy"org.scala-js::scalajs-env-jsdom-nodejs:1.1.0"
71- val scalajsEnvExoegoJsdomNodejs = ivy"net.exoego::scalajs-env-jsdom-nodejs:2.1.0"
72- val scalajsEnvNodejs = ivy"org.scala-js::scalajs-env-nodejs:1.4.0"
73- val scalajsEnvPhantomjs = ivy"org.scala-js::scalajs-env-phantomjs:1.0.0"
74- val scalajsEnvSelenium = ivy"org.scala-js::scalajs-env-selenium:1.1.1"
75- val scalajsSbtTestAdapter = ivy"org.scala-js:: scalajs-sbt-test-adapter :${scalaJsVersion}"
76- val scalajsLinker = ivy"org.scala-js:: scalajs-linker :${scalaJsVersion}"
77- val scalajsImportMap = ivy"com.armanbilge::scalajs-importmap:0.1.1"
71+ val scalajsEnvJsdomNodejs = ivy"org.scala-js::scalajs-env-jsdom-nodejs:1.1.0".withDottyCompat(scalaVersion)
72+ val scalajsEnvExoegoJsdomNodejs = ivy"net.exoego::scalajs-env-jsdom-nodejs:2.1.0".withDottyCompat(scalaVersion)
73+ val scalajsEnvNodejs = ivy"org.scala-js::scalajs-env-nodejs:1.4.0".withDottyCompat(scalaVersion)
74+ val scalajsEnvPhantomjs = ivy"org.scala-js::scalajs-env-phantomjs:1.0.0".withDottyCompat(scalaVersion)
75+ val scalajsEnvSelenium = ivy"org.scala-js::scalajs-env-selenium:1.1.1".withDottyCompat(scalaVersion)
76+ val scalajsSbtTestAdapter = ivy"org.scala-js:scalajs-sbt-test-adapter_2.13 :${scalaJsVersion}"
77+ val scalajsLinker = ivy"org.scala-js:scalajs-linker_2.13 :${scalaJsVersion}"
78+ val scalajsImportMap = ivy"com.armanbilge::scalajs-importmap:0.1.1".withDottyCompat(scalaVersion)
7879 }
7980
8081 object Scalanative_0_5 {
@@ -101,9 +102,11 @@ object Deps {
101102 }
102103 object Play_2_7 extends Play {
103104 val playVersion = "2.7.9"
105+ override def scalaVersion: String = Deps.scala2Version
104106 }
105107 object Play_2_8 extends Play {
106108 val playVersion = "2.8.22"
109+ override def scalaVersion: String = Deps.scala2Version
107110 }
108111 object Play_2_9 extends Play {
109112 val playVersion = "2.9.5"
@@ -117,9 +120,9 @@ object Deps {
117120 val acyclic = ivy"com.lihaoyi:::acyclic:0.3.12"
118121 val ammoniteVersion = "3.0.0-M2-15-9bed9700"
119122 val asmTree = ivy"org.ow2.asm:asm-tree:9.7"
120- val bloopConfig = ivy"ch.epfl.scala::bloop-config:1.5.5"
123+ val bloopConfig = ivy"ch.epfl.scala::bloop-config:1.5.5".withDottyCompat(scalaVersion)
121124
122- val coursier = ivy"io.get-coursier::coursier:2.1.13"
125+ val coursier = ivy"io.get-coursier::coursier:2.1.13".withDottyCompat(scalaVersion)
123126 val coursierInterface = ivy"io.get-coursier:interface:1.0.19"
124127
125128 val cask = ivy"com.lihaoyi::cask:0.9.4"
@@ -159,8 +162,11 @@ object Deps {
159162 // can't use newer versions, as these need higher Java versions
160163 val testng = ivy"org.testng:testng:7.5.1"
161164 val sbtTestInterface = ivy"org.scala-sbt:test-interface:1.0"
162- def scalaCompiler(scalaVersion: String) = ivy"org.scala-lang:scala-compiler:${scalaVersion}"
163- val scalafmtDynamic = ivy"org.scalameta::scalafmt-dynamic:3.8.3"
165+ def scalaCompiler(scalaVersion: String) = {
166+ if (scalaVersion.startsWith("3.")) ivy"org.scala-lang:scala3-compiler_3:${scalaVersion}"
167+ else ivy"org.scala-lang:scala-compiler:${scalaVersion}"
168+ }
169+ val scalafmtDynamic = ivy"org.scalameta::scalafmt-dynamic:3.8.3".withDottyCompat(scalaVersion)
164170 def scalap(scalaVersion: String) = ivy"org.scala-lang:scalap:${scalaVersion}"
165171 def scalaReflect(scalaVersion: String) = ivy"org.scala-lang:scala-reflect:${scalaVersion}"
166172 val scalacScoveragePlugin = ivy"org.scoverage:::scalac-scoverage-plugin:1.4.11"
@@ -179,11 +185,11 @@ object Deps {
179185 val sourcecode = ivy"com.lihaoyi::sourcecode:0.3.1"
180186 val upickle = ivy"com.lihaoyi::upickle:3.3.1"
181187 val windowsAnsi = ivy"io.github.alexarchambault.windows-ansi:windows-ansi:0.0.5"
182- val zinc = ivy"org.scala-sbt::zinc:1.10.2"
188+ val zinc = ivy"org.scala-sbt::zinc:1.10.2".withDottyCompat(scalaVersion)
183189 // keep in sync with doc/antora/antory.yml
184190 val bsp4j = ivy"ch.epfl.scala:bsp4j:2.2.0-M2"
185191 val fansi = ivy"com.lihaoyi::fansi:0.5.0"
186- val jarjarabrams = ivy"com.eed3si9n.jarjarabrams::jarjar-abrams-core:1.14.0"
192+ val jarjarabrams = ivy"com.eed3si9n.jarjarabrams::jarjar-abrams-core:1.14.0".withDottyCompat(scalaVersion)
187193 val requests = ivy"com.lihaoyi::requests:0.9.0"
188194 val logback = ivy"ch.qos.logback:logback-classic:1.5.7"
189195 val sonatypeCentralClient = ivy"com.lumidion::sonatype-central-client-requests:0.3.0"
@@ -243,7 +249,7 @@ def millBinPlatform: T[String] = T {
243249def baseDir = build.millSourcePath
244250
245251val essentialBridgeScalaVersions =
246- Seq(Deps.scalaVersion, Deps.scalaVersionForScoverageWorker1, Deps.workerScalaVersion212)
252+ Seq(Deps.scalaVersion, Deps.scala2Version, Deps. scalaVersionForScoverageWorker1, Deps.workerScalaVersion212)
247253// published compiler bridges
248254val bridgeScalaVersions = Seq(
249255 // Our version of Zinc doesn't work with Scala 2.12.0 and 2.12.4 compiler
@@ -380,20 +386,23 @@ trait MillPublishJavaModule extends MillJavaModule with PublishModule {
380386 */
381387trait MillScalaModule extends ScalaModule with MillJavaModule with ScalafixModule { outer =>
382388 def scalaVersion = Deps.scalaVersion
389+ def scalapVersion = T { Deps.scala2Version }
383390 def scalafixScalaBinaryVersion = ZincWorkerUtil.scalaBinaryVersion(scalaVersion())
384391 def semanticDbVersion = Deps.semanticDBscala.version
385392 def scalacOptions =
386393 super.scalacOptions() ++ Seq(
387394 "-deprecation",
388- "-P:acyclic:force",
389395 "-feature",
390396 "-Xlint:unused",
391397 "-Xlint:adapted-args"
398+ ) ++ (
399+ if (scalaVersion().startsWith("3.")) Seq.empty
400+ else Seq("-P:acyclic:force")
392401 )
393402
394403 def scalacPluginIvyDeps =
395404 super.scalacPluginIvyDeps() ++
396- Agg(Deps.acyclic) ++
405+ Agg.when(!scalaVersion().startsWith("3.")) (Deps.acyclic) ++
397406 Agg.when(scalaVersion().startsWith("2.13."))(Deps.millModuledefsPlugin)
398407
399408 def mandatoryIvyDeps =
@@ -413,7 +422,8 @@ trait MillScalaModule extends ScalaModule with MillJavaModule with ScalafixModul
413422trait MillBaseTestsModule extends TestModule {
414423 def forkArgs = T {
415424 Seq(
416- s"-DMILL_SCALA_2_13_VERSION=${Deps.scalaVersion}",
425+ s"-DMILL_SCALA_3_NEXT_VERSION=${Deps.scalaVersion}",
426+ s"-DMILL_SCALA_2_13_VERSION=${Deps.scala2Version}",
417427 s"-DMILL_SCALA_2_12_VERSION=${Deps.workerScalaVersion212}",
418428 s"-DTEST_SCALA_2_13_VERSION=${Deps.testScala213Version}",
419429 s"-DTEST_SCALA_2_13_VERSION_FOR_SCALANATIVE_4_2=${Deps.testScala213VersionForScalaNative42}",
@@ -556,7 +566,9 @@ trait BridgeModule extends MillPublishJavaModule with CrossScalaModule {
556566 def ivyDeps = Agg(
557567 ivy"org.scala-sbt:compiler-interface:${Deps.zinc.version}",
558568 ivy"org.scala-sbt:util-interface:${Deps.zinc.version}",
559- ivy"org.scala-lang:scala-compiler:${crossScalaVersion}"
569+ ) ++ Agg(
570+ if (crossScalaVersion.startsWith("3.")) ivy"org.scala-lang::scala3-compiler:${crossScalaVersion}"
571+ else ivy"org.scala-lang:scala-compiler:${crossScalaVersion}"
560572 )
561573
562574 def resources = T.sources {
@@ -565,7 +577,8 @@ trait BridgeModule extends MillPublishJavaModule with CrossScalaModule {
565577 }
566578
567579 def compilerBridgeIvyDeps: T[Agg[Dep]] = Agg(
568- ivy"org.scala-sbt::compiler-bridge:${Deps.zinc.version}".exclude("*" -> "*")
580+ (if (crossScalaVersion.startsWith("3.")) ivy"org.scala-lang:scala3-sbt-bridge:${crossScalaVersion}"
581+ else ivy"org.scala-sbt::compiler-bridge:${Deps.zinc.version}").exclude("*" -> "*")
569582 )
570583
571584 def compilerBridgeSourceJars: T[Agg[PathRef]] = T {
@@ -726,19 +739,19 @@ object dist0 extends MillPublishJavaModule {
726739
727740 def testTransitiveDeps = build.runner.testTransitiveDeps() ++ Seq(
728741 build.main.graphviz.testDep(),
729- build.runner.linenumbers.testDep(),
742+ // build.runner.linenumbers.testDep(),
730743 build.scalalib.backgroundwrapper.testDep(),
731744 build.contrib.bloop.testDep(),
732745 build.contrib.buildinfo.testDep(),
733- build.contrib.scoverage.testDep(),
734- build.contrib.scoverage.worker2.testDep(),
735- build.contrib.jmh.testDep(),
736- build.contrib.playlib.testDep(),
737- build.contrib.playlib.worker("2.8").testDep(),
738- build.contrib.errorprone.testDep(),
739- build.contrib.checkstyle.testDep(),
740- build.bsp.worker.testDep(),
741- build.testkit.testDep()
746+ // build.contrib.scoverage.testDep(),
747+ // build.contrib.scoverage.worker2.testDep(),
748+ // build.contrib.jmh.testDep(),
749+ // build.contrib.playlib.testDep(),
750+ // build.contrib.playlib.worker("2.8").testDep(),
751+ // build.contrib.errorprone.testDep(),
752+ // build.contrib.checkstyle.testDep(),
753+ // build.bsp.worker.testDep(),
754+ // build.testkit.testDep()
742755 )
743756}
744757
@@ -1011,14 +1024,14 @@ def validate(): Command[Unit] = {
10111024}
10121025
10131026val dummyDeps: Seq[Dep] = Seq(
1014- Deps.DocDeps.millScip,
1027+ // Deps.DocDeps.millScip,
10151028 Deps.semanticDbJava,
1016- Deps.semanticDBscala,
1029+ // Deps.semanticDBscala,
10171030 Deps.TestDeps.scalaTest,
10181031 Deps.TestDeps.zioTest,
1019- Deps.acyclic,
1020- Deps.scalacScoverage2Plugin,
1021- ivy"com.lihaoyi:::ammonite:${Deps.ammoniteVersion}"
1032+ // Deps.acyclic,
1033+ // Deps.scalacScoverage2Plugin,
1034+ // ivy"com.lihaoyi:::ammonite:${Deps.ammoniteVersion}"
10221035) ++ Deps.transitiveDeps ++ Deps.RuntimeDeps.all
10231036
10241037implicit object DepSegment extends Cross.ToSegments[Dep]({ dep =>
0 commit comments