I am using the Gradle plugin mavento create an artifact that will be used for another unrelated project. Along with the built-in .jar artifact, I would also like to create and install the -javadoc.jar artifact with it.
Usage gradle clean build javadoc installgenerates a JavaDoc in the local build file and installs the inline artifact in the local repository, but it does not currently create or install -javadoc.jar with it.
Is there a way to do this in Gradle using a plugin mavenor javadoc? I do not mind writing a custom task for this, but I prefer to use the “officially supported” method, if one exists.
Build.gradle file:
project.group = "org.example.artefact"
project.version = "1.0-SNAPSHOT"
apply plugin: 'java'
apply plugin: 'maven'
dependencies {
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file:///home/user/.m3/repository")
}
}
}