0

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?

Alexander Myltsev
  • 459
  • 1
  • 3
  • 13

2 Answers2

1

Are you using https://github.com/sbt/sbt-unidoc ? If not, perhaps it may be the solution you're looking for.

nafg
  • 2,424
  • 27
  • 25
1

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)
Thomas Bach
  • 103
  • 7