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.12k stars 339 forks source link

Support deploying to multiple tracks at the same time #1140

Closed avalanchas closed 1 month ago

avalanchas commented 2 months ago

Problem description

I would like to have one build (one version code) be deployed to multiple tracks at the same time so that I don't have to promote a release manually later (in case I want multiple tracks to have the same content).

Potential solutions/workarounds

I am a beginner at this so please forgive any ignorance, but from the API docs (if I have the correct ones), it looks like this should be possible in a loop: https://developers.google.com/android-publisher/tracks#apk_workflow_example

Call the Edits.tracks: update method for each track that you want to release APKs on

I imagine a solution where I would write something like this:

gradle app:publishReleaseBundle --track=beta,alpha

play {
    track.set("alpha,beta") 
}

Additional context

Current state: the plugin tries to find a track called "alpha,beta" image

SUPERCILEX commented 2 months ago

The way the plugin works, you have to first publish and then promote: https://github.com/Triple-T/gradle-play-publisher?tab=readme-ov-file#promoting-artifacts

avalanchas commented 2 months ago

Uh ok so this is already possible with the plugin as it is? Can add something like this to my gradle file?

play {
    // ...
    promoteTrack.set("alpha")
    promoteTrack.set("beta")
}

If so, how would this be written on the command line?

SUPERCILEX commented 2 months ago

If you swap out the promote statement between two builds so it first first goes to alpha and then beta, then sure. See https://github.com/Triple-T/gradle-play-publisher?tab=readme-ov-file#promoting-artifacts

Also you're probably making this too complicated. Just publish directly to beta? Like I don't see the point of filling all the tracks.

avalanchas commented 2 months ago

Haha yeah I get how this probably sounds. But after 1 or 2 years Google sends you notifications that some dependencies in your builds in some tracks (even paused ones) are outdated and threatens consequences if you don't update soon. And since I've already used internal and alpha before, I'm on the hook for them. So I'd like to update all tracks regularly without having to think about it every year

Anyway thank you so much, I'll look into promoting as soon as I can :)

SUPERCILEX commented 2 months ago

Well that's dumb about google, thanks for the context.

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.