Closed SUPERCILEX closed 3 years ago
So I was able to repro this, but sadly there's no way to fix it because it's an ordering issue again. The only solution is to put an apply(plugin = "com.github.triplet.play")
line and do all GPP configuration after AGP configuration has run.
Thinking about this more, it might be possible to fix it if we created a single build service that acted as a registry keyed by appId that's passed in lazily to each task. Punting this.
Actually, I just realized we still need the appId to create the commitEdit task, so this issue still wouldn't be fixed if the build service thing was figured out. The BuildService API supposedly invokes AutoCloseable#close()
when the service is no longer needed, but I don't know if that's reliable enough to move the commit edit logic from a task to that closable API in the build service.
If this issue becomes more important in the future, I'll look into the build service closable idea further.
https://github.com/Triple-T/gradle-play-publisher/issues/876#issuecomment-834200124