Can't access all JavaPluginConvention properties?

I’m confused by some apparent discrepancies between the Gradle documentation and the actual Java API.

this page lists various directory properties such as

  • reportsDir
  • libsDir
  • distsDir

for which JavaPluginConvention.java has no accessors, while there are accessors for some of the other properties listed, such as

  • testResultsDir
  • testReportDir
  • docsDir

Am I missing something? Is there another way we’re supposed to access these, or is the documentation completely wrong?

After some more digging, it appears that the documentation is papering over some details, and there’s no superclass or interface on JavaPluginConvention that suggests the right place to look.

libsDir and distsDir actually come from the BasePluginConvention:
project.getConvention().getPlugin(BasePluginConvention.class).getLibsDirName() and .getDistsDirName()

and reportsDir actually comes from the reporting extension:
project.getExtensions().getByType(ReportingExtension.class).getBaseDir()