Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Multi artifact UploadArchives from a Gradle build file.
artifacts {
archives file: 'A.jar', name: 'A', type: 'jar'
archives file: 'B.jar', name: 'B', type: 'jar'
}
uploadArchives {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
repository(url: "dav:https://myRepo.com/release/") {
authentication(userName: xxx, password: yyy)
}
addFilter('A') {artifact, file ->
artifact.name == 'A'
}
addFilter('B') {artifact, file ->
artifact.name == 'B'
}
pom('A').version = ant.properties['release.version']
pom('B').version = ant.properties['release.version']
}
}
}
@smullangiche

This comment has been minimized.

Copy link

commented Jun 2, 2015

What is there in the ant.properties file??

@smullangiche

This comment has been minimized.

Copy link

commented Jun 3, 2015

Thanks for the solution, It was useful for us..
is there any other solution to simplify instead adding addFilter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.