The Gradle dependencies task shows a report of resolved module dependencies. By hard-coding a specific file, you are including that specific file in the relevant configuration, but bypassing all of the dependency management capabilities, including display in the dependency report.
It is possible to declare a dependency on the module rather than the underlying file while still resolving to the file on this directory. This would result in the module being shown in the dependency report.