-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Current Behavior
Originally reported in Gradle forum (post), where I was suggested to post here
I’m trying to upgrade a project from Gradle 8.11 to Gradle 8.12, and I’m constantly getting compilation issues when executing any gradle task.
Caused by: java.lang.NullPointerException: group.displayName must not be null
at org.gradle.problems.internal.impl.DefaultProblemsReportCreatorKt$problemId$1$1.invoke(DefaultProblemsReportCreator.kt:104)
at org.gradle.problems.internal.impl.DefaultProblemsReportCreatorKt$problemId$1$1.invoke(DefaultProblemsReportCreator.kt:102)
at org.gradle.internal.cc.impl.problems.JsonWriter$jsonObjectList$1$1.invoke(JsonWriter.kt:84)
at org.gradle.internal.cc.impl.problems.JsonWriter$jsonObjectList$1$1.invoke(JsonWriter.kt:83)
at org.gradle.internal.cc.impl.problems.JsonWriter.jsonObject(JsonWriter.kt:39)
at org.gradle.internal.cc.impl.problems.JsonWriter$jsonObjectList$1.invoke(JsonWriter.kt:83)
at org.gradle.internal.cc.impl.problems.JsonWriter$jsonObjectList$1.invoke(JsonWriter.kt:82)
at org.gradle.internal.cc.impl.problems.JsonWriter$jsonList$1$1.invoke(JsonWriter.kt:98)
at org.gradle.internal.cc.impl.problems.JsonWriter$jsonList$1$1.invoke(JsonWriter.kt:97)
at org.gradle.internal.cc.impl.problems.JsonWriter.jsonListItem(JsonWriter.kt:105)
at org.gradle.internal.cc.impl.problems.JsonWriter.jsonList(JsonWriter.kt:97)
at org.gradle.internal.cc.impl.problems.JsonWriter.jsonObjectList(JsonWriter.kt:82)
at org.gradle.internal.cc.impl.problems.JsonWriter.jsonObjectList(JsonWriter.kt:77)
Workarounds
The error goes away as soon as I either:
- Revert back to Gradle 8.11, or
- Disable the generated HTML report with
--no-problems-report
flag.
Expected Behavior
Gradle tasks succeed without issues and without having to use the --no-problems-report
flag
Context (optional)
I’ve narrowed down the problem to the new Problems API implementation (this line, specifically).
Self-contained Reproducer Project
Unfortunately, I have not been able to create a self-contained reproducer project, not even with the project replicator. My app consists of several modules, combines React Native and KMP, so not a very common setup and hard to replicate.
I’m guessing there’s something wrong with my project that the Problems API would warn me about, but unfortunately it’s hard to figure out what given that the reports fails to build.
Gradle version
8.12
Build scan URL (optional)
No response
Your Environment (optional)
Gradle: 8.12.0
Kotlin: 2.0.21
AGP: 8.8.0
JVM: 17
React Native: 0.78.0