How does Gradle/Android Studio create the ash folder for each dependency during build?

I am trying to build code that will look at the dependencies in my application to put together some graphs (not important for my question). I noticed that the dependencies for my application are in a hash. How is this hash being generated? I would like to know the mechanics behind it.

I tried the gradle documentation but could not find the answer.

I am using:

classpath ''

Every time I rebuild a new folder with a new hash for each of the libs gets created. So I am wondering how is that hash calculated. Please help.