Exclude artifact from parent gradle script

Hi, I want to exclude one of the files in uploadArchives artifacts in parent gradle script (kept on nexus server) to be not uploaded to repositories. That is, I want to explicitly exclude the artifact of parent gradle.

Is there a way to do this ?

Thanks, Pankit

What exactly do you mean by “parent gradle script”? Typically, the best solution is not to add the artifact in the first place, rather than trying to remove it later.

Here is the detailed description :

I have a gradle script which initializes the repos for upload and download. I want to add this script to nexus server. And then apply it in other projects.

Previously I was using the same script to upload and initialize repos. But, now I have broken that into two separate scripts and it works now!!!

Thanks for your response.