micronaut-projects / micronaut-gradle-plugin

A Gradle Plugin for Micronaut
Apache License 2.0
65 stars 43 forks source link

Mitigate slow performance of `findLibrary` #941

Closed melix closed 5 months ago

melix commented 5 months ago

This commit introduces a cache for the version catalog lookups. It appears that Gradle's findLibrary method is extremely inefficient, causing dramatic build time increases, in particular in multiproject setups.

The fix isn't great though, since it involves a static cache, but for now there's no better API until Gradle 8.7 is shipped. Even so, ideally there should be an API to get the library coordinates directly.

See https://github.com/gradle/gradle/pull/27444 See https://github.com/gradle/gradle/issues/25226

Fixes #932

CLAassistant commented 5 months ago

CLA assistant check
All committers have signed the CLA.

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
90.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud