I have a multi-project SBT configuration. I have a class my.AClass
in project1
. What should I add to configuration to make scaladoc as follows
/**
* [[my.AClass]]
*/
class BClass
in project2 be successfully compiled by sbt project2/doc
?
I have a multi-project SBT configuration. I have a class my.AClass
in project1
. What should I add to configuration to make scaladoc as follows
/**
* [[my.AClass]]
*/
class BClass
in project2 be successfully compiled by sbt project2/doc
?
Are you using https://github.com/sbt/sbt-unidoc ? If not, perhaps it may be the solution you're looking for.
Something like this should work:
val scalaVer = "2.12"
val commonSettings: Seq[Def.Setting[_]] = Seq(
autoAPIMappings := true,
apiURL := Some(url(s"file:${baseDirectory.value.getAbsolutePath}/target/scala-${scalaVer}/api")),
)
lazy val a = (project in file("a")).settings(commonSettings)
lazy val b = (project in file("b")).settings(commonSettings)