@@ -15,6 +15,9 @@ lazy val sbtPluginFilePath: String =
15
15
new File (sys.props(" user.home" ) + " /.sbt/1.0/plugins" ).mkdirs()
16
16
communitybuildDir.resolve(" sbt-dotty-sbt" ).toAbsolutePath().toString()
17
17
18
+ lazy val sbtScalaJSPluginFilePath : String =
19
+ communitybuildDir.resolve(" sbt-scalajs-sbt" ).toAbsolutePath().toString()
20
+
18
21
def log (msg : String ) = println(Console .GREEN + msg + Console .RESET )
19
22
20
23
/** Executes shell command, returns false in case of error. */
@@ -65,6 +68,7 @@ final case class SbtCommunityProject(
65
68
project : String ,
66
69
sbtTestCommand : String ,
67
70
extraSbtArgs : List [String ] = Nil ,
71
+ forceUpgradeSbtScalajsPlugin : Boolean = false ,
68
72
dependencies : List [CommunityProject ] = Nil ,
69
73
sbtPublishCommand : String = null ) extends CommunityProject :
70
74
override val binaryName : String = " sbt"
@@ -77,10 +81,14 @@ final case class SbtCommunityProject(
77
81
val sbtProps = Option (System .getProperty(" sbt.ivy.home" )) match
78
82
case Some (ivyHome) => List (s " -Dsbt.ivy.home= $ivyHome" )
79
83
case _ => Nil
84
+ val scalaJSPluginArgs =
85
+ if (forceUpgradeSbtScalajsPlugin) List (s " --addPluginSbtFile= $sbtScalaJSPluginFilePath" )
86
+ else Nil
80
87
extraSbtArgs ++ sbtProps ++ List (
81
88
" -sbt-version" , " 1.3.8" ,
82
89
" -Dsbt.supershell=false" ,
83
- s " --addPluginSbtFile= $sbtPluginFilePath" )
90
+ s " --addPluginSbtFile= $sbtPluginFilePath"
91
+ ) ++ scalaJSPluginArgs
84
92
85
93
object projects :
86
94
lazy val utest = MillCommunityProject (
@@ -310,7 +318,8 @@ object projects:
310
318
311
319
lazy val catsEffect2 = SbtCommunityProject (
312
320
project = " cats-effect-2" ,
313
- sbtTestCommand = " test"
321
+ sbtTestCommand = " test" ,
322
+ forceUpgradeSbtScalajsPlugin = true
314
323
)
315
324
316
325
lazy val catsEffect3 = SbtCommunityProject (
0 commit comments