Open davidmichaelkarr opened 7 years ago
Anyone home? My effort to convert this Maven build to Gradle is at a standstill until I can solve this.
@davidmichaelkarr
This issue is probably due to the usage of
afterEvaluate {
tagletPath ((configurations.taglet.files) as File[])
}
You shouldn't use afterEvaluate
.
When you apply gradle-aggregate-javadocs-plugin
, it will register a clousre with projectsEvaluated
here, just like you do with afterEvaluate
. This is the interesting part: the closure gradle-aggregate-javadocs-plugin
registered would be executed before your closure, so it couldn't see your tagletPath
.
I don't know why you are using an afterEvaluate
, but it may be the cause.
I've created an example to compare the usage with and without afterEvaluate
here: https://github.com/blindpirate/multi-doc
Please let me know if this solves your question.
Thanks for the reply. I replied with more information on the forum. How about we keep the discussion there, and not duplicated, until we come to a conclusion, and then we can summarize here?
I would not be at all surprised that I'm doing something wrong, but here's what's happening.
I've written a custom javadoc taglet that is deployed to a GAV on our nexus server. I've specified the "tagletPath" option for the "javadoc" options block for my subprojects, and I did the same for the top-level "tasks.withType(Javadoc)" block. For now, the subproject javadoc block's "tagletPath" value is a little more complex than the top-level one, but I still can't get the top-level aggregateJavadocs tasks to emit a "-tagletpath" option at all. I verified that it's at least seeing the top-level block, as I gave the various header strings slightly different values, and I can see those resulting strings in the produced "javadoc.options" file.
The following is my entire top-level build.gradle file:
When I ran the build, I then inspected the resulting "javadoc.options" files, both in one of the subprojects, and the one in the root.
This is an excerpt of the file from one of the subprojects:
This is a similar excerpt, except from the top-level build, where I ran "aggregateJavadocs":
Notice the slightly different header values, but the missing "tagletpath" option.
I inspected the code for this plugin, and I don't understand how this could happen.