mirror of https://github.com/sbt/sbt.git
Add condition preventing errors on 3.0.0. Add scripted test for running doc on Scala.js project
This commit is contained in:
parent
fcab06bd3d
commit
236f419f88
|
|
@ -2107,7 +2107,11 @@ object Defaults extends BuildCommon {
|
|||
val projectName = name.value
|
||||
if (ScalaArtifacts.isScala3(sv)) {
|
||||
val project = if (config == Compile) projectName else s"$projectName-$config"
|
||||
compileOptions ++ Seq("-project", project)
|
||||
if (scalaVersion.value.startsWith("3.0.0")) {
|
||||
Seq("-project", project)
|
||||
} else {
|
||||
compileOptions ++ Seq("-project", project)
|
||||
}
|
||||
} else compileOptions
|
||||
},
|
||||
(TaskZero / key) := {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
val scala3Version = "3.0.1-RC1-bin-20210525-8f3fdf5-NIGHTLY"
|
||||
|
||||
enablePlugins(ScalaJSPlugin)
|
||||
|
||||
lazy val root = project
|
||||
.in(file("."))
|
||||
.settings(
|
||||
name := "scala3-simple",
|
||||
version := "0.1.0",
|
||||
|
||||
scalaVersion := scala3Version,
|
||||
)
|
||||
|
|
@ -0,0 +1 @@
|
|||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1")
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package test
|
||||
|
||||
import scala.scalajs.js
|
||||
|
||||
final case class RouteLocation(loc: String, state: js.UndefOr[js.Any])
|
||||
|
||||
|
||||
object RouteLocation:
|
||||
def apply(loc: String): RouteLocation = RouteLocation(loc, js.undefined)
|
||||
|
||||
/**
|
||||
* ```scala sc:compile
|
||||
* import scala.scalajs.js
|
||||
* final case class RouteLocation(loc: String, state: js.UndefOr[js.Any])
|
||||
*
|
||||
*
|
||||
* object RouteLocation:
|
||||
* def apply(loc: String): RouteLocation = RouteLocation(loc, js.undefined)
|
||||
* ```
|
||||
*/
|
||||
case class Test(s: String)
|
||||
|
|
@ -0,0 +1 @@
|
|||
> doc
|
||||
Loading…
Reference in New Issue