@@ -163,9 +163,10 @@ abstract class DependencyExtractor :
163163 val configurationName = details.configurationName
164164
165165 if (! configurationFilter.include(rootPath, configurationName)) {
166- LOGGER .debug( " Ignoring resolved configuration: $rootPath - $configurationName " )
166+ LOGGER .info( " Excluding resolved configuration from dependency graph : $rootPath - $configurationName " )
167167 return
168168 }
169+ LOGGER .info(" Including resolved configuration in dependency graph: $rootPath - $configurationName " )
169170
170171 val scope = dependencyScope(rootPath, configurationName)
171172
@@ -293,7 +294,12 @@ abstract class DependencyExtractor :
293294
294295 private fun createRenderer (): DependencyGraphRenderer {
295296 LOGGER .lifecycle(" Constructing renderer: ${getRendererClassName()} " )
296- return Class .forName(getRendererClassName()).getDeclaredConstructor().newInstance() as DependencyGraphRenderer
297+ val dependencyGraphRenderer =
298+ Class .forName(getRendererClassName()).getDeclaredConstructor().newInstance() as DependencyGraphRenderer
299+ if (LOGGER .isInfoEnabled) {
300+ return LoggingDependencyGraphRenderer (dependencyGraphRenderer)
301+ }
302+ return dependencyGraphRenderer
297303 }
298304
299305 private fun getOutputDir (): File {
@@ -334,6 +340,22 @@ abstract class DependencyExtractor :
334340 }
335341 }
336342
343+ private class LoggingDependencyGraphRenderer (private val delegate : DependencyGraphRenderer ) : DependencyGraphRenderer {
344+ override fun outputDependencyGraph (
345+ pluginParameters : PluginParameters ,
346+ buildLayout : BuildLayout ,
347+ resolvedConfigurations : List <ResolvedConfiguration >,
348+ outputDirectory : File
349+ ) {
350+ for (configuration in resolvedConfigurations) {
351+ for (dependency in configuration.allDependencies) {
352+ LOGGER .info(" Detected dependency '${dependency.id} ': project = '${configuration.rootOrigin.path} ', configuration = '${configuration.configurationName} '" )
353+ }
354+ }
355+ delegate.outputDependencyGraph(pluginParameters, buildLayout, resolvedConfigurations, outputDirectory)
356+ }
357+ }
358+
337359 companion object {
338360 private val LOGGER = Logging .getLogger(DependencyExtractor ::class .java)
339361 }
0 commit comments