NPE in task commitEdit due to recent fix for Gradle 8.1 configuration cache
lordcodes opened this issue · comments
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
- Gradle Play Publisher: 3.8.2
- Gradle Wrapper: 8.1.1
- Android Gradle Plugin: 8.0.1
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.
-
Task
:commitEditForProject
of typecom.github.triplet.gradle.play.tasks.CommitEdit
: cannot deserialize object of type 'org.gradle.api.invocation.Gradle' as these are not supported with the configuration cache. -
Task
:commitEditForProject
of typecom.github.triplet.gradle.play.tasks.CommitEdit
: cannot serialize object of type 'org.gradle.invocation.DefaultGradle', a subtype of 'org.gradle.api.invocation.Gradle', as these are not supported with the configuration cache.