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.09k stars 339 forks source link

NPE in task commitEdit due to recent fix for Gradle 8.1 configuration cache #1085

Closed lordcodes closed 1 year ago

lordcodes commented 1 year ago

Describe the bug

v3.8.2 included a change to include a 'Gradle' argument into the task CommitEdit. I'm not sure if this is happening for everyone, but on my project this 'Gradle' argument is null and so the task throws a NullPointerException every time it is ran. This prevents me from performing releases to Google Play using the plugin.

How To Reproduce

Versions

Tasks executed

publishBundle

Expected behavior

The app bundle is published and version committed.

Additional context (if a crash, provide stack trace)

Caused by: org.gradle.api.GradleException: Could not evaluate spec for 'Task satisfies onlyIf spec'.
    at org.gradle.api.internal.tasks.execution.SelfDescribingSpec.isSatisfiedBy(SelfDescribingSpec.java:42)
    at org.gradle.api.specs.AndSpec.findUnsatisfiedSpec(AndSpec.java:67)
    at org.gradle.api.internal.tasks.execution.DescribingAndSpec.findUnsatisfiedSpec(DescribingAndSpec.java:58)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:50)
    ... 50 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.gradle.api.invocation.Gradle.getTaskGraph()" because the return value of "com.github.triplet.gradle.play.tasks.CommitEdit.access$getGradle$p(com.github.triplet.gradle.play.tasks.CommitEdit)" is null
    at com.github.triplet.gradle.play.tasks.CommitEdit$1.isSatisfiedBy(CommitEdit.kt:24)
    at com.github.triplet.gradle.play.tasks.CommitEdit$1.isSatisfiedBy(CommitEdit.kt:17)
    at org.gradle.api.internal.tasks.execution.SelfDescribingSpec.isSatisfiedBy(SelfDescribingSpec.java:40)

There are also warnings about failures with the configuration cache.

SUPERCILEX commented 1 year ago

1083