I would like my Gradle build script to add the complete Classpath to the manifest file contained in JAR file created after the build.
Example:
Manife
I had a similar yet not identical problem. I was publishing my lib jar L in the artifactory, and later fetching it as a dependency of module M, but the transitive dependencies, the ones which L need for compile and runtime, did not arrive with it. It took me sometime to realize that my jar was published into the artifactory with an empty pom file, hence gradle was not able to know which are L's transitive dependencies to be fetched. The missing piece was an instruction, in the L's build.gradle, to publish the pom. As often with gradle, the connection between the name of the insturction, and its meaning, is completely:
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://localhost/tmp/myRepo/")
}
}
}
Source: uploading_to_maven_repositories