Long-term solution will be to switch from the legacy Variant API to the new Variant API.
Note: This is a partial fix, because if both tasks try to configure themselves in the same build execution, the problem will still occur. But it is not clear if it should be fixed on our side or problem is on the gradle-play-publisher plugin side.
Review checklist (to be filled by reviewers)
[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
[ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
What does this PR do?
This PR switches to the lazy configuration of upload task by using
TaskContainer#register
API instead ofTaskContainer#create
. This solves the problem of compatibility with https://github.com/Triple-T/gradle-play-publisher plugin which is similar to what described here https://github.com/Triple-T/gradle-play-publisher/issues/940.Long-term solution will be to switch from the legacy Variant API to the new Variant API.
Note: This is a partial fix, because if both tasks try to configure themselves in the same build execution, the problem will still occur. But it is not clear if it should be fixed on our side or problem is on the
gradle-play-publisher
plugin side.Review checklist (to be filled by reviewers)