Debug Gradle Source Code

I would like to debug gradle’s source code. More specifically, I would like to debug before, during, and after CachingModuleComponentRepository is called.

Can anyone point me to the right direction on how to attach Gradle Source Code and debug it?

I tried running with gradle build -Dorg.gradle.debug=true as well as adding org.gradle.jvmargs="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 which worked to debug my build.gradle task.

What is the preferred approach? With that, how do you debug Gradle’s source code? Where do you attache sources within your gradle project.

I’m using gradle 4.3.1 and intellij

Thanks in advance!

I’m troubleshooting an identical issue to Changing module not expired when using Artifactory

I have a Changing Module (maven SNAPSHOT) as a dependency. Whenever a new snapshot is uploaded, my dependent project continues to use the stale version.

I turned off caching for changing modules via

configurations.all {
resolutionStrategy { cacheChangingModulesFor 0, ‘seconds’ }

To resolve this caching issue, I have to remove the module descriptor from ~/.gradle/caches/modules-2/metadata-2.31/descriptors/