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

Release notes are not upladed when calling publishBundle #1045

Closed mskvorcovs closed 2 years ago

mskvorcovs commented 2 years ago

Release-notes are not being published when running publishBundle command. Thea same as mentioned here: https://github.com/Triple-T/gradle-play-publisher/issues/1043#issue-1167999984

com.github.triplet.play:com.github.triplet.play.gradle.plugin:3.7.0 Gradle 7.2 com.android.tools.build:gradle:7.1.2

The structure below was generated by running bootstrapMarketReleaseListing. I have renamed the production.txt -> default.txt to be able to use the same release notes for internal track.

image

This is my config

play {
    serviceAccountCredentials = file('***.json')
    track.set("internal")
    releaseStatus.set(ReleaseStatus.COMPLETED)
    defaultToAppBundles.set(true)
}

Now, after edits in changelog I run publishMarketReleaseBundle to internal track and get the bundle uploaded, but not the release notes.

SUPERCILEX commented 2 years ago

Hmmm, that all looks correct. Can you run $ cat app/build/generated/gpp/marketRelease/play/release-notes/en-US/default.txt and see if it has your release notes? Note that I don't remember if the dir should be marketRelease so you might have to ls app/build/generated/gpp/ and see what comes up.

mskvorcovs commented 2 years ago

It seems that 'release-notes' directory is empty

image

Is there anything I've missed?

SUPERCILEX commented 2 years ago

Ah, well that would be your issue. When you run a publishing build, is the :app:generateMarketReleasePlayResources task running?

mskvorcovs commented 2 years ago

According to the console output the task IS running (see below), but it is running BEFORE app:clean (might be the issue)

gradle publishMarketReleaseBundle --stacktrace 
=======================================================

OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0

> Configure project :app

> Task :app:generateMarketReleasePlayResources UP-TO-DATE
> Task :app:clean
SUPERCILEX commented 2 years ago

That's definitely the issue lol. Just run clean in a separate build invocation and you should be good.

mskvorcovs commented 2 years ago

I'm not sure if I understood you correctly, how am I supposed to fix that? I'm NOT calling the app:clean task, it's being invoked by the gradle publishMarketReleaseBundle --stacktrace

SUPERCILEX commented 2 years ago

The clean task does not invoke itself. Look through your build logic for the string "clean" and you'll probably find something that triggers it.

mskvorcovs commented 2 years ago

OMG, that's embarrasing! Thank you! Sorry for taking your time!

SUPERCILEX commented 2 years ago

No prob