This is an sbt question.
My project implements Java bridges to a Scala library. All the public code is Java. I’ve given up on trying to run javadoc within sbt, so I generate the docs with a separate script. My problem is publishing: I need publishSigned to use the docs I’ve generated, not whatever is produced by the doc task.
I finally found a way, but it feels more like a hack than anything else:
This / Compile / doc := baseDirectory.value / "docs"
It works, though: publishSigned generates and signs a jar using docs, where my javadoc-generated content lives.
I even went a step further and made the doc task run my script:
This / Compile / doc := {
import scala.sys.process._
val script = baseDirectory.value / "makedocs.sh"
val out = baseDirectory.value / "docs"
s"zsh $script" ! streams.value.log
out
}
This is even more of a hack, especially since makedocs.sh uses sbt to calculate the class path!
There has to be something cleaner… Any advice?