Last active
April 19, 2019 01:42
-
-
Save kriegerd/4688748 to your computer and use it in GitHub Desktop.
Multi artifact UploadArchives from a Gradle build file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] | |
} | |
} | |
} |
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
What is there in the ant.properties file??