One cache for both commandLine and Android Studio gradle?

Precondition: all caches cleared

When i run android studio build i have my dependencies loaded into cache. all as planned.

But when i try to run ./gradlew sometask in the same project, i can clearly see that all dependencies redownloads from scratch.

I wonder if its intended to have two separate caches for gradle in same project: one for AS and one for …? what?

Can someone explain why it happens, and should i be worried about it?