We're trying to publish our artifact to both Artif...
# touchlab-tools
j
We're trying to publish our artifact to both Artifactory (self-hosted, for Android) and GH Packages (for iOS). It publishes the package but then fails when it tries to.. do it again later in the same job run?
Caused by: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not PUT '<https://maven.pkg.github.com/[redacted]/0.1.47/shared-0.1.47.pom>'. Received status code 409 from server: Conflict
shared's build.gradle:
Copy code
kmmbridge {
    mavenPublishArtifacts()
    spm()
}

addGithubPackagesRepository()

configure<PublishingExtension> {
    setupAndroidPublishing(
        artifactoryUsername = getArtifactoryUsername(),
        artifactoryToken = getArtifactoryToken(),
    )
}
where that
setupAndroidPublishing
method is:
Copy code
fun PublishingExtension.setupAndroidPublishing(artifactoryUsername: String?, artifactoryToken: String?) {
    publications {
        create<MavenPublication>("Artifactory") {
            repositories {
                maven {
                    url = URI("https://[redacted]")
                    credentials {
                        username = artifactoryUsername
                        password = artifactoryToken
                    }
                }
            }
        }
    }
}
Note that when I remove
mavenPublishArtifacts()
, the error still occurs