I’m trying to include a generated file in the jar artifact of a groovy build. I generate the file by using
def versionFilePath = "$buildDir/classes/version.config"
compile files(versionFilePath) {
builtBy "generateVersionStamp"
}
but I cannot get it to be included in the output Jar. I’ve tried
jar.include(versionFilePath)
with no luck. Any suggestions? Is there a better way to embed version information in an artifact?