When using this plugin in our repository, we found that the task processReleaseMetadata is running on regular debug builds and PRs, so as we don't provide keystore and service account on debug builds, the json file doesn't exist, failing the build.
google_play.json file.google_play.json not found.assembleDebugprocessReleaseMetadataWe want to run this task on releases only, so there should be a way to skip this processReleaseMetadata task on non-release builds.
We're publishing releases on tagged builds.
Yep, this change is intentional. The idea that if you don't have credentials, you should simply disable all of GPP. It could something like this:
play {
isEnabled = file("google_play.json").exists()
}
That led me to reading this section. Thanks.
@SUPERCILEX the processReleaseMetadata task is still running on CI even though I've disabled it by default. We want to use this as our travis CI config. Is there something I'm missing?
You haven't disabled it: you set enabled = true which is the default. As per my above comment, this should work:
play {
enabled = rootProject.file('google_play.json').exists()
}
Thanks again for the fast reply, the CI build is now passing.
@SUPERCILEX 1 more question - the publishRelease task is successful, but I cannot see any changes in the Play store page. The page's still on the previous release. What do you suggest to do? Do we need to create a new, updated service account?
My guess is that the app was published as a rollout release due to this line. If you just remove it or change the value to completed you should be good.
Most helpful comment
Yep, this change is intentional. The idea that if you don't have credentials, you should simply disable all of GPP. It could something like this: