Skip to content

Instantly share code, notes, and snippets.

@kriegerd
Last active April 19, 2019 01:42
Show Gist options
  • Save kriegerd/4688748 to your computer and use it in GitHub Desktop.
Save kriegerd/4688748 to your computer and use it in GitHub Desktop.
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
Copy link

What is there in the ant.properties file??

@smullangiche
Copy link

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