@@ -15,6 +15,9 @@ lazy val sbtPluginFilePath: String =
1515 new File (sys.props(" user.home" ) + " /.sbt/1.0/plugins" ).mkdirs()
1616 communitybuildDir.resolve(" sbt-dotty-sbt" ).toAbsolutePath().toString()
1717
18+ lazy val sbtScalaJSPluginFilePath : String =
19+ communitybuildDir.resolve(" sbt-scalajs-sbt" ).toAbsolutePath().toString()
20+
1821def log (msg : String ) = println(Console .GREEN + msg + Console .RESET )
1922
2023/** Executes shell command, returns false in case of error. */
@@ -65,6 +68,7 @@ final case class SbtCommunityProject(
6568 project : String ,
6669 sbtTestCommand : String ,
6770 extraSbtArgs : List [String ] = Nil ,
71+ forceUpgradeSbtScalajsPlugin : Boolean = false ,
6872 dependencies : List [CommunityProject ] = Nil ,
6973 sbtPublishCommand : String = null ) extends CommunityProject :
7074 override val binaryName : String = " sbt"
@@ -77,10 +81,14 @@ final case class SbtCommunityProject(
7781 val sbtProps = Option (System .getProperty(" sbt.ivy.home" )) match
7882 case Some (ivyHome) => List (s " -Dsbt.ivy.home= $ivyHome" )
7983 case _ => Nil
84+ val scalaJSPluginArgs =
85+ if (forceUpgradeSbtScalajsPlugin) List (s " --addPluginSbtFile= $sbtScalaJSPluginFilePath" )
86+ else Nil
8087 extraSbtArgs ++ sbtProps ++ List (
8188 " -sbt-version" , " 1.3.8" ,
8289 " -Dsbt.supershell=false" ,
83- s " --addPluginSbtFile= $sbtPluginFilePath" )
90+ s " --addPluginSbtFile= $sbtPluginFilePath"
91+ ) ++ scalaJSPluginArgs
8492
8593object projects :
8694 lazy val utest = MillCommunityProject (
@@ -310,7 +318,8 @@ object projects:
310318
311319 lazy val catsEffect2 = SbtCommunityProject (
312320 project = " cats-effect-2" ,
313- sbtTestCommand = " test"
321+ sbtTestCommand = " test" ,
322+ forceUpgradeSbtScalajsPlugin = true
314323 )
315324
316325 lazy val catsEffect3 = SbtCommunityProject (
0 commit comments