I would like to create an Uber/Shadow/All Sources Jar. It is easy enough to create a binary JAR using the Shadow plugin , however creating a sources uber jar is not supported see, issue 112
I have attempted to use ArtifactResolutionQuery to find sources for dependencies however this is unable to resolve Project dependencies, it only works for Maven deps. Here is a simple sample project I created as a test case.
In summery:
ArtifactResolutionResult result = dependencies.createArtifactResolutionQuery()
.forComponents(componentIds)
.withArtifacts(JvmLibrary, SourcesArtifact, JavadocArtifact)
.execute()
result.resolvedComponents does not contain SourcesArtifact for project deps.
Is there any other way I can obtain sources for project dependencies or is there an alternative to way of creating a source uber jar ?