-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publishing broken by commit a7fb709 : Cannot get property 'group' on null object #875
Comments
I am a Java programmer, not a Groovy programmer, but I believe the required fix is to simply change the |
Ran into the exact same problem when trying to upgrade from 7.x to 8.x. |
Here's a reproducible test case (it probably could be shrunk some more, but the key point is it demonstrates the problem). Unzip it. cd into the project. Execute ./gradlew generatePomFileForMavenJavaPublication Fails with the error. Fails with any 8.x version of shadow. In gradle.properties, change shadowVersion to 7.1.2. Execute ./gradlew wrapper --gradle-version=7.6.3 Re-execute ./gradlew generatePomFileForMavenJavaPublication Works. |
Is there anything we can do in our Gradle configuration to work around this bug? |
Can you try out 9.0.0-beta4? |
Shadow Version
8.1.1
Gradle Version
8.2.1
Expected Behavior
Publish should not fail with a NullPointerException
Actual Behavior
With --stacktrace option:
Analysis
Commit a7fb709 - see a7fb709 introduced this issue.
The old code:
In this old (working) code, the dependency node is only added when the IF statement matches.
The new code:
This new code introduces the bug. I had two SelfResolvingDependency instances in my configuration and these did not match the 'IF" condition and hence the closure returned a null.
When the
each
call loops overallDependencies
the null causes an exception.The text was updated successfully, but these errors were encountered: