Separately publish maven attachments

I’m building NARs on multiple platforms (Mac and Windows).

NARs have a jar as the primary artifact, with the platform-specific nar files as attachments (using the “AOL” convention for the classifier). e.g.:

publishing {
    publications {
        nar(MavenPublication) {
            groupId "com.example"
            artifactId "foobar"
            version project.version
            artifact file("$projectDir/foobar.jar")
            artifact (file("$projectDir/foobar-x86_64-MacOSX-gcc-shared.nar")) {
                extension "nar"
                classifier "x86_64-MacOSX-gcc-shared"
            }
            artifact (file("$projectDir/foobar-x86_64-Windows-MSVC-shared.nar")) {
                extension "nar"
                classifier "x86_64-Windows-MSVC-shared"
            }
        }
    }
}

However, because the builds are running on different boxes, the publishing step can’t happen in one shot. Ideally, I’d like to be able to “append” the attachments to the primary artifact as the builds finish. Something like:

publishing {
    publications {
        // main jar
        narPrimary(MavenPublication) {
            groupId "com.example"
            artifactId "foobar"
            version project.version
            artifact (file("$projectDir/foobar.jar")) {
                extension "jar"
            }
        }
          // platform specific attachment (mac)
        narAttachmentMac(MavenPublication) {
            groupId "com.example"
            artifactId "foobar"
            version project.version
            artifact (file("$projectDir/foobar-x86_64-MacOSX-gcc-shared.nar")) {
                extension "nar"
                classifier "x86_64-MacOSX-gcc-shared"
            }
        }
          // platform specific attachment (win)
        narAttachmentWin(MavenPublication) {
            groupId "com.example"
            artifactId "foobar"
            version project.version
            artifact (file("$projectDir/foobar-x86_64-Windows-MSVC-shared.nar")) {
                extension "nar"
                classifier "x86_64-Windows-MSVC-shared"
            }
        }
    }
}

where narPrimary runs once, followed by narAttachmentMac on the mac build slave, followed by narAttachmentWin on the windows build slave.

However, this doesn’t work. Gradle/Maven thinks that each invocation is for an entirely new set of artifacts. (For snapshots it gets a new unique id, and for releases it errors out.)

Is this problem a limitation of Gradle’s Maven API? Can appending attachments be made to work?