With Gradle 5.0-rc1 I experience very long import times when using the gradle-intellij-plugin.
Profiling revealed that the problem is the method ErrorHandlingModuleComponentRepository.tryResolveAndMaybeBlacklist that explicitly calls Thread.sleep repeatedly before blacklisting the internal repository. This adds around 50 seconds to the Gradle import in my case. There was no such problem with Gradle 4.10.2. How can I further debug this situation?
This happens on every import, not only the first one. There is no error, the import completes successfully. I’m importing a multi-module project with a single nexus repository and the problem is only caused by the project that uses the plugin that I mentioned above. If I remove that project from the build, the import is fast.
And, most interestingly, I only get this problem on my macOS machine, but not on my Windows machine. Like in https://github.com/gradle/gradle/issues/7787 the conditions seem to be quite sensitive.
When profiling, I did not see that any HTTP requests were made for the dependency resolutions that lead to these blacklistings.
I would like to see which dependency resolutions actually cause the problem. How do I switch on the loggers to get some some debugging output?
Thanks for the added information. We need to improve the debuggability of http retries so that such issues can be analyzed better. Even turning on debug log level will not be enough here.
Assuming your project cannot be shared, would you be ok to try out a custom Gradle version so that we can understand the issue better?
I tried to pass -Dorg.gradle.logging.level=debug to the Gradle VM options in the IDEA configuration, but that does not affect the import. I looked at the source code of the IDEA Gradle plugin and it always passes --info as an argument for the project resolver unless --debug is already contained in the arguments. I don’t see any way to pass arguments for the import, only VM parameters. I have to see the debug output for the import and not for the command line build, because this only happens during the import. Am I missing something?