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.1k stars 340 forks source link

Update priority doesn't seem to work #913

Closed milis92 closed 3 years ago

milis92 commented 3 years ago

Describe the bug

We recently added support for in app updates. Everything works as expected, except update priority which is always 0

Our play configuration block:

play {
    enabled.set(true)
    serviceAccountCredentials.set(file("../.github/play_service_account.json"))

    defaultToAppBundles.set(true)
    resolutionStrategy.set(ResolutionStrategy.AUTO)

    releaseName.set(project.extra.get("RELEASE_NAME") as String)
    releaseStatus.set(IN_PROGRESS)
    userFraction.set(0.05)
    updatePriority.set(3)
}

We tried different values for releaseStatus and userFraction, also with no resolution strategy, but always with the same result. We tried to publish the app onto different channels as well

How To Reproduce

Versions

Tasks executed

uploadStagingDebugPrivateBundle uploadStagingReleasePrivateBundle publishStagingReleaseBundle --track="alpha"

Expected behavior

We expect to get appropriate update priority passed with deployment

Additional context (if a crash, provide stack trace)

We have managed publishing turned on We made sure we followed the testing procedure specified in play documentation

SUPERCILEX commented 3 years ago

Note that the upload* tasks don't use in app update priority because the API doesn't support that. To check if GPP is doing the right thing, you can run publishing with the --debug flag. Look for {packageName}/edits in the output and you should find GPP's API request. If it has the correct priority, then something is probably wrong on your end.

milis92 commented 3 years ago

Ohh thanks for the upload*. It's weird and unexpected GPP has no support for update priority on internal publishing :/ Il report my findings on publish tasks

margarita-v commented 3 years ago

@milis92 Hello! I was able to test immediate app update using the highest inAppUpdatePriority for internal testing. It works!

play {
    serviceAccountCredentials.set(file("your-service-account-file.json"))
    track.set("internal")
    updatePriority.set(5)
    artifactDir.set(file("build/outputs/apk/release")) // put release apk to app/build/outputs/apk/release
    releaseStatus.set(ReleaseStatus.COMPLETED)
}

And then ./gradlew publishReleaseApk You can also run ./gradlew publishReleaseApk --debug as mentioned above and clearly see in logs the updated priority to 5 in my case

milis92 commented 3 years ago

@margarita-v Hey, thanks for the update, this was a low priority for us so we kinda pushed this issue for later. I've seen you're using apks instead of bundles, that might be what's causing the issue on our side.

Il try to allocate a little bit of time to see whats going on. Again, thanks for the help