Skip to content

Commit 5040b44

Browse files
committed
figure out scaladoc 3 flags later
1 parent 6164e0f commit 5040b44

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

build.sbt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,21 @@ lazy val apiDocSettings = Seq(
122122
if (version endsWith "-SNAPSHOT") snapshotBranch
123123
else version
124124
val sourceUrl = "https://github.com/dylemma/xml-spac/tree/" + sourceTree + "\u20ac{FILE_PATH}.scala"
125-
Seq(
126-
"-groups",
127-
"-implicits",
128-
s"-implicits-hide:${ classesForHiddenConversions.mkString(",") }",
129-
"-sourcepath", sourcePath,
130-
"-doc-source-url", sourceUrl
131-
)
125+
CrossVersion.partialVersion(scalaVersion.value) match {
126+
case Some((2, _)) =>
127+
Seq(
128+
"-groups",
129+
"-implicits",
130+
s"-implicits-hide:${ classesForHiddenConversions.mkString(",") }",
131+
"-sourcepath", sourcePath,
132+
"-doc-source-url", sourceUrl
133+
)
134+
case _ =>
135+
// ScalaDoc in Scala 3 seems like it's still working out some stuff.
136+
// Flags like `groups` are supposed to work according to their documentation, but I get "bad option -groups" when I use it.
137+
// For now I'm just going to leave off all of the options entirely and figure it out later.
138+
Nil
139+
}
132140
}
133141
)
134142

0 commit comments

Comments
 (0)