Triple-T / gradle-play-publisher

GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.
MIT License
4.13k stars 341 forks source link

Build still fails with ResolutionStrategy.IGNORE on version conflict #1003

Closed PhilipSA closed 3 years ago

PhilipSA commented 3 years ago

I don't understand why my build fails even ResolutionStrategy.IGNORE flag is set. When uploading multiple apps using flavors if one of them fails due to already being uploaded all of them fails. I expect the build to just ignore these uploads and upload all artifacts for the other apps. Instead the build stops and nothing is uploaded.

Not sure if this is a bug or if i have misinterpreted the documentation.

    play {
        resolutionStrategy.set(com.github.triplet.gradle.androidpublisher.ResolutionStrategy.IGNORE)
    }
{
    "code": 403,
    "errors": [
    {
        "domain": "global",
        "message": "Cannot update a published APK.",
        "reason": "forbidden"
    }
    ],
    "message": "Cannot update a published APK.",
    "status": "PERMISSION_DENIED"
}
SUPERCILEX commented 3 years ago

Yeah, this is a bug. The API keeps changing the message and reason which means our logic breaks. This line needs to be updated: https://github.com/Triple-T/gradle-play-publisher/blob/2b14f4556313975687f87e9a60c00e039368fdd2/play/android-publisher/src/main/kotlin/com/github/triplet/gradle/androidpublisher/internal/DefaultEditManager.kt#L216