Getting substituted dependencies

I have a plugin that looks for project dependencies in a given configuration using :


This return all configuration dependencies but not substituted dependencies. It tried using :


But I’m unable to clearly identify substituted dependencies, how can I use this API ?

The goal is to be able to detect something like : ./gradlew --include-build ../lib clean build