[Groovy/Gradle] 'manifest' cannot be applied to '(groovy.lang.Closure)'

已回答

Hello,

I suppose the problem is related to Groovy type system support.

When using Gradle Java plugin I always have a warning highlight in IDE on JAR manifest configuration:

'manifest' in 'org.gradle.api.tasks.bundling.Jar' cannot be applied to '(groovy.lang.Closure)'

However, corresponding method exists (https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/bundling/Jar.html#manifest-groovy.lang.Closure-) and the script compiles successfully.

I observe this behavior for a pretty long time, so I'm sorry if the issue is already known. Quick search on the forum gave me only 2006 year related report: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206903165-False-cannot-be-applied-to- 

IntelliJ IDEA 2021.2 (Build #IU-212.4746.92)

Best regards,

Ihor.

评论操作 固定链接

I have the same. Annoying.

0
评论操作 固定链接

Thank you. Solved it. (Upgrade to gradle 7.4)

0
评论操作 固定链接

I opened it on a different computer, same idea version, same project, same gradle wrapper - now it's back... :(

0

请先登录再写评论。