Gradle 6.1.1
Does it https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_packaging include docs and sources of Scala & Groovy if they are applied to the build?
Gradle 6.1.1
Does it https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_packaging include docs and sources of Scala & Groovy if they are applied to the build?
Hi @aeiplatform,
That’s a good question.
The sources are all bundled. Yes.
As for the docs, we only execute javaDoc and bundle that.
I think for groovy and scala doc, you would need to create a separate Jar (or bundle things differently) as they produce a different output (each with their own index.html
).
We could maybe add something to Gradle, but I am not sure what exactly. Maybe something similar to withJavadoc
for the Groovy and Scala plugin.
For now, you can quite easily setup things yourself. E.g.
val groovydocJar = tasks.register<Jar>("groovydocJar") {
from(tasks.named("groovydoc"))
archiveClassifier.set("groovydoc")
}
val scaladocJar = tasks.register<Jar>("scaladocJar") {
from(tasks.named("scaladoc"))
archiveClassifier.set("scaladoc")
}
tasks.assemble {
dependsOn(groovydocJar, scaladocJar)
}
Do you also care about publishing the additional doc jars?