Merge pull request #6499 from pikinier20/scaladoc-scalac-options

Add missing scalac options to scaladoc task configuration
This commit is contained in:
eugene yokota 2021-05-30 22:06:32 -04:00 committed by GitHub
commit f2f884436b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 1 deletions

View File

@ -2119,7 +2119,11 @@ object Defaults extends BuildCommon {
val projectName = name.value
if (ScalaArtifacts.isScala3(sv)) {
val project = if (config == Compile) projectName else s"$projectName-$config"
Seq("-project", project)
if (scalaVersion.value.startsWith("3.0.0")) {
Seq("-project", project)
} else {
compileOptions ++ Seq("-project", project)
}
} else compileOptions
},
(TaskZero / key) := {

View File

@ -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,
)

View File

@ -0,0 +1 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1")

View File

@ -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)

View File

@ -0,0 +1 @@
> doc