How to create javadoc-style documentation for a Scala-based project in sbt?

I have a Scala project under sbt. I would like to create javadoc for it, since most of the project API users are Java developers. Is it possible?

+7
source share
2 answers

I assume that you need your documents in JavaDoc format in order to have something familiar to people who are used in java libraries?

There is a project of types called GenJavaDoc, which may be what you are looking for. It generates documents for the scala library in a format that is very similar to javadoc. It can be integrated into the sbt assembly.

Akka has a very complete java api, and many Akka users come from the java world, so obviously they need it.

Project repository

Acca japi docs generated by tool

Roland Kuhn's blog entry describing the tool and rationale

+6
source
% sbt doc 

You will find the results in target/scala-version/api (assuming you are using a simple SBT project that does not have multiple subprojects).

Update:

The experiment shows that the SBT doc command generates documents for both Scala and Java sources in the project.

+4
source

All Articles