nebula-plugins / gradle-lint-plugin

A pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts.
Apache License 2.0
771 stars 89 forks source link

Avoid accessing `Task.project` from task action #412

Open abstratt opened 1 month ago

abstratt commented 1 month ago

Please, avoid accessing Task.project from task action. This is going to be deprecated in Gradle 8.12, and forbidden in a future release.

Some occurrences:

https://github.com/nebula-plugins/gradle-lint-plugin/blob/221218a91f61f715f10a6e9fdebcfcbc844fde01/src/main/groovy/com/netflix/nebula/lint/plugin/LintGradleTask.groovy#L60

https://github.com/nebula-plugins/gradle-lint-plugin/blob/221218a91f61f715f10a6e9fdebcfcbc844fde01/src/main/groovy/com/netflix/nebula/lint/plugin/FixGradleLintTask.groovy#L58

See: https://github.com/gradle/gradle/issues/30860