Skip to content

Instantly share code, notes, and snippets.

@jaredsburrows
Forked from kriegerd/gist:4688748
Created October 24, 2015 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredsburrows/fced94509051888022e9 to your computer and use it in GitHub Desktop.
Save jaredsburrows/fced94509051888022e9 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']
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment