From 3d9e44db1960a18a5ce39fd8ed9e68be94cea77d Mon Sep 17 00:00:00 2001 From: "Yang, Bo" Date: Mon, 9 Jan 2023 07:29:28 -0800 Subject: [PATCH] Update ScaladocFeatures.scala --- .../sbtBestPractice/scalacOptions/ScaladocFeatures.scala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scalac-options/src/main/scala/com/thoughtworks/sbtBestPractice/scalacOptions/ScaladocFeatures.scala b/scalac-options/src/main/scala/com/thoughtworks/sbtBestPractice/scalacOptions/ScaladocFeatures.scala index cc4ada6..4469794 100644 --- a/scalac-options/src/main/scala/com/thoughtworks/sbtBestPractice/scalacOptions/ScaladocFeatures.scala +++ b/scalac-options/src/main/scala/com/thoughtworks/sbtBestPractice/scalacOptions/ScaladocFeatures.scala @@ -14,7 +14,14 @@ object ScaladocFeatures extends AutoPlugin { override def trigger = allRequirements override val projectSettings = Seq( - Compile / doc / scalacOptions ++= Seq("-doc-root-content", (baseDirectory.value / "README.md").toString()), + Compile / doc / scalacOptions ++= { + if (scalaBinaryVersion.value == 3) { + // Scaladoc 3 supports Markdown + Seq("-doc-root-content", (baseDirectory.value / "README.md").toString()) + } else { + Seq.empty + } + }, scalacOptions in Compile in doc += "-groups", scalacOptions in Compile in doc += "-diagrams", scalacOptions in Compile in doc += "-implicits",