Skip to content

Commit 624b434

Browse files
committed
only add moduledefs for 2.13 and 3.x
1 parent d1cfa01 commit 624b434

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

build.mill

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,20 @@ trait MillScalaModule extends ScalaModule with MillJavaModule with ScalafixModul
400400
else Seq("-P:acyclic:force")
401401
)
402402

403-
def scalacPluginIvyDeps =
403+
def scalacPluginIvyDeps = T {
404+
def sv = scalaVersion()
405+
def hasModuleDefs = sv.startsWith("2.13.") || sv.startsWith("3.")
404406
super.scalacPluginIvyDeps() ++
405-
Agg.when(!scalaVersion().startsWith("3."))(Deps.acyclic) ++
406-
Agg(Deps.millModuledefsPlugin)
407+
Agg.when(!sv.startsWith("3."))(Deps.acyclic) ++
408+
Agg.when(hasModuleDefs)(Deps.millModuledefsPlugin)
409+
}
407410

408-
def mandatoryIvyDeps =
411+
def mandatoryIvyDeps = T {
412+
def sv = scalaVersion()
413+
def hasModuleDefs = sv.startsWith("2.13.") || sv.startsWith("3.")
409414
super.mandatoryIvyDeps() ++
410-
Agg(Deps.millModuledefs)
415+
Agg.when(hasModuleDefs)(Deps.millModuledefs)
416+
}
411417

412418
/** Default tests module. */
413419
lazy val test: MillScalaTests = new MillScalaTests {}

0 commit comments

Comments
 (0)