How to exclude zip only from archives for Maven repo upload?

Something like this should do:

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