The groovydoc task considered as up-to-date even if overview.html has been updated


(Igor Melnichenko) #1

The groovydoc task is considered up-to-date even if overview.html has been updated.
I’m using Gradle 2.8-rc-1.

(Sterling Greene) #2

Thanks @Myllyenko I raised this as GRADLE-3349

This doesn’t appear to be a new problem in 2.8-rc-1, but just a shortcoming of the Groovydoc task implementation.

The workaround is to add the ‘overview.html’ file as an input so Gradle will look at it when performing up-to-date checks. e.g.,

groovydoc {
  overview = "overview.html"
  inputs.file overview

(Sterling Greene) #3

For future readers, this was fixed in 2.14 with the introduction of overviewText (replaces overview).

groovydoc {
   overviewText = resources.text.fromFile("overview.html")

You can also put the overview inline now:

groovydoc {
   overviewText = resources.text.fromString("""
<b>Hello World</b>

Thanks again @Myllyenko