'Gradle plugins sources and JavaDoc in InteliJ

I want to view the source code with JavaDoc of gradle plugins inside InteliJ when added functionality to the build.gradle file. Im using gradle from gradle-wrapper.properties file.

When I Ctrl + left click the reports in the example below, the .class is decompiled instead of showing me this javadoc from inside InteliJ.

subprojects {
    jacocoTestReport {
        reports {
            xml.required = true
            csv.required = false
        }
        dependsOn test // tests are required to run before generating the report
    }
}

I tried adding the idea plugin inside my build.gradle, with no success.

plugins {
    id 'jacoco'
    id 'idea'
}

idea {
    module {
        downloadJavadoc = true
        downloadSources = true
    }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source