I have a Java project that I am developing with IntelliJ and Gradle. I have defined the idea block in me build.gradle
that, in short, what it does is download the sources and javadoc of those libraries that are in some maven repository:
idea{
module {
downloadJavadoc = true // defaults to false
downloadSources = true
}
}
So far everything is correct. However, I have an external library, which is not found in any maven repository. To import this library I have defined, in the repositories block , the libs folder, in which I have dropped the library and its corresponding javadoc.
repositories {
// repositorios maven
flatDir {
dirs 'libs'
}
}
I have added the corresponding dependencies in the dependencies block . The project compiles correctly and loads the javadoc of those libraries that are downloaded from a maven repository, however it does not load the javadoc of the external library in question. Do I have to somehow define the javadoc of said library in my build.gradle?
Thanks in advance.
It seems that the problem lies in the file and directory structure of the javadoc. After analyzing the javadoc jar, it seems that it did not have the proper file structure. When opening the jar (with 7zip), it contains a directory called javadoc which contains the documentation directories and files.
The solution is simply to eliminate said intermediate directory, leaving the files and directories it contained in the root of the jar.