ben-manes / gradle-versions-plugin

Gradle plugin to discover dependency updates
Apache License 2.0
3.83k stars 200 forks source link

Avoid configuring dependencyUpdates task #736

Closed dreis2211 closed 1 year ago

dreis2211 commented 1 year ago

Hi,

I noticed that the dependencyUpdates task (e.g. when added via global init script) is configured regardless of any task avoidance being used. This is caused by the usage of tasks.findByName() that was introduced with https://github.com/ben-manes/gradle-versions-plugin/pull/504 .

image

Eventually this causes an overhead by using Kotlin reflection in DependencyUpdatesTask.callIncompatibleWithConfigurationCache.

image

A workaround for this is to use tasks.getNames().contains().

Let me know what you think. Cheers, Christoph

ben-manes commented 1 year ago

thanks!