'How to retrieve the full classpath of the project from a gradle plugin task?

I am working on a gradle plugin, and I need to retrieve the full classpath of the project, from the implementaton configurations and main source. I can retrieve the list of dependencies for a configuration, but I cannot retrieve the list of file associated to build my classpath.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source