diff --git a/build.sbt b/build.sbt index 8d7831f37..f9d3dcc02 100644 --- a/build.sbt +++ b/build.sbt @@ -104,6 +104,35 @@ lazy val root = project docs ) +//Switch to using the Scala 2 Scaladoc generator, which might not have this issue. + +Compile / doc := (Compile / doc).value +Compile / doc / scalacOptions ++= Seq( + "-Xdoc-generator", "scaladoc" +) +Compile / doc / sources := Seq.empty +Compile / packageDoc / publishArtifact := false + +Compile / doc := { + val targetDir = (Compile / target).value / "scala-3" / "api" + val files = (Compile / doc / sources).value + val s = streams.value + val cp = (Compile / doc / fullClasspath).value + val opts = (Compile / doc / scalacOptions).value + + IO.createDirectory(targetDir) + val options = opts ++ Seq("-d", targetDir.getAbsolutePath) + + val run = new ScalaDocRunner() + run.run("scala.tools.nsc.ScalaDoc", options, files, cp.files, s.log) + + targetDir +} + + + + + lazy val tests = crossProject(JSPlatform, JVMPlatform, NativePlatform) .in(file("tests")) .dependsOn(zioSchemaDerivation % "compile->test", zioSchema % "test->test", zioSchemaZioTest % "compile->test") diff --git a/project/build.properties b/project/build.properties index e8a1e246e..abbbce5da 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.7 +sbt.version=1.9.8 diff --git a/project/plugins.sbt b/project/plugins.sbt index a16d7d128..0cfcd72a0 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -9,5 +9,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.16") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6") addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.4.0-alpha.22") +addSbtPlugin("org.scala-lang.modules" % "sbt-scala3doc" % "0.2.0") + libraryDependencies += "org.snakeyaml" % "snakeyaml-engine" % "2.7"