-> doc

> excludeB

# hybrid project, only scaladoc run
> doc
$ exists target/api/index.js
$ exists target/api/A$.html
$ absent target/api/scala
$ absent target/api/java

> setDocExtension scala

# The original B.scala fails scaladoc
$ copy-file changes/B.scala B.scala
# compile task is superfluous. Since doc task preceded by compile task has been problematic due to scala
# compiler's way of handling empty classpath. We have it here to test that our workaround works.
> clean ; compile ; doc

# pure scala project, only scaladoc at top level
$ exists target/api/index.js
$ exists target/api/A$.html
$ exists target/api/B$.html
$ absent target/api/package-list
$ absent target/api/scala
$ absent target/api/java

> setDocExtension java

> clean ; doc

# pure java project, only javadoc at top level
$ exists target/api/index.html
$ exists target/api/pkg/J.html
$ absent target/api/index.js

> setDocExtension scala
> ++2.13.11
> clean
$ absent target/api/A$.html
> doc
$ exists target/api/A$.html
$ exists target/api/B$.html

# pending
# $ absent target/api/scala
# $ absent target/api/java
