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",