DistTar but not to upload

Hi there, my project is using Gradle 3.3 for management.

Recently, according to the policy, I can’t upload distributed ZIP or TAR files to the nexus.

Is there any solution I can just distribute the ZIP or TAR files through tasks like ‘assemble’, but not to upload them through ‘uploadArchives’?

Have tried something like:

configurations.archives.with {
    artifacts.remove artifacts.find { it.archiveTask.is distZip }
}

But this will prevent Gradle to distribute ZIP or TAR either.

Please help me, thank you.

UPD:

After refactor the build.gradle, the problem is solved.

the method above should be the right answer, I think :slight_smile: