Skip to content

Shadow 8.3.6 not working with Gradle 9 preleases (aka Groovy 4) #1464

@Technici4n

Description

@Technici4n

Expected and Results

Hi, I am writing a Gradle plugin that uses Shadow and I wanted to test it on Gradle 9, but ran into an incompatibility inside the shadow plugin. Specifically with how Groovy 4 handles super calls.

See https://github.com/neoforged/ModDevGradle/actions/runs/15619647688/job/44000997539?pr=263. The problem comes from com.github.jengelman.gradle.plugins.shadow.impl.RelocatorRemapper.mapValue(RelocatorRemapper.groovy:84). Specifically the super call doesn't work anymore on Groovy 4 after being compiled with Groovy 3. (See https://issues.apache.org/jira/browse/GROOVY-11193)

Suggested fix: Add @CompileStatic to that class and hopefully to as many classes, if possible.

Thanks a lot!

Related environment and versions

No response

Reproduction steps

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions