In short… here is my pattern:
[organisation]/[module]/[revision]/[artifact]-[revision](+[conf]).[ext]
For these values…
- organisation = com.me
- module = foo
- revision = 1.2.3
- artifact = foo
- ext = zip
- conf = vc140_x86-64.debug
I would like to generate an artifact at:
But when I publish, it omits the optional ‘+[conf]’ portion. If I remove the parentheses to make it not optional, it appends ‘+[conf]’ to the artifact file’s basename, literally with no value substitution.
What do I need to do for this to work? That configuration metadata is pretty important to have in an artifact filename.
In terms of how I’m setting it up… I’ve tried a lot of things. Here is the latest experimental code, but it varies minute to minute as I try different things
void setupPublishing(Project project) {
project.publishing.publications {
ivyArtifact(IvyPublication) {
organisation project.group
module project.name
revision project.version
configurations.create(project.buildConfig)
artifact(project.tasks.jar) {
conf project.buildConfig
}
}
}
}
}