Where does gradle look for NDK dependencies?

I’m trying to use gradle from the command line but keep getting this error:

FAILURE: Build failed with an exception.

* Where:
Build file 'E:\prog\anthracite\gradle\nativeactivity\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':nativeactivity'.
> Failed to apply plugin [class 'com.android.build.gradle.model.BaseComponentModelPlugin']
   > The SDK directory 'E:\NVPACK\android-sdk-windows' does not exist.

Some time ago, that’s where I stored my copy of the NDK but I’ve since re-installed it elsewhere, have updated references in android studio and environment variables but, unfortunately, gradle seems to want to cling on to the old location and I don’t know where it’s storing this information.

If anybody here can help, I’d appreciate it.