I'd like to loop over resolved dependencies to app...
# community-support
g
I'd like to loop over resolved dependencies to apply some action on some of them. I'm playing with
project::afterEvaluate
in order to query it after the project has been evaluated and the configurations dependencies resolved. I'm querying this way:
Copy code
project.afterEvaluate {
            configurations.configureEach {
                if (name.endsWith("CompileClasspath") || name.endsWith("RuntimeClasspath"))
                    resolvedConfiguration.files.forEach { println(it) }
            }
        }
but Gradle still complains
Cannot change hierarchy of dependency configuration 'composeAppdesktopCompilationApi' after it has been included in dependency resolution.
Therefore I think I'm still doing in the wrong place/phase but I'd like to have these actions performed automatically in the plugin
::apply
instead of a generic task
maybe I got it
Copy code
this.incoming.afterResolve {
    this.resolutionResult.allDependencies.forEach { 
        println(it) 
    }
}