Gradle, Jenkins, and executing uploadArchives only if build succeeds

Hi.

What are people using for an idiom to do the following:

I execute “gradle clean build uploadArchives”, but I only want the uploadArchive task to execute if the build task succeeds.

Anybody? I found predicates here http://gradle.org/docs/current/userguide/userguide_single.html#N10E05 but am not sure how to elegantly use them in this case.

Thank you.

That’s the behavior you get in the first place.

Ohh. Thanks.