I have a build script that defines a task that produces a file, which happens to be a fully-specified POM file. In order to publish this file, I need to sign it. Although I specify this file as an artifact, and request signing of this file, no signing is performed when I build my project. If I attempt to perform a release, the signing process occurs before the file is created, resulting in a “file not found” failure.
artifacts {
archives tasks["${profile}Jar"]
archives tasks["${profile}SourcesJar"]
archives tasks["${profile}JavadocJar"]
archives(pomCopy.ext.pomFile) {
builtBy pomCopy
}
}
signing {
sign tasks["${profile}Jar"]
sign tasks["${profile}SourcesJar"]
sign tasks["${profile}JavadocJar"]
sign file(tasks['pomCopy'].ext.pomFile)
}
I’m producing a custom POM because the dependencies declared in the auto-generated POM are inaccurate. Is it possible to sign my custom POM file with the Gradle Signing plugin? If so, how?
For reference, the JARs specified in the signing profile do get signed. Also, if I change the task that produces the POM to type “Tar”, the resulting file gets signed, but it also gets compressed… not what I want.