Gradle not finding VisualC++

I’m trying to build c++ libraries on windows, gradle isn’t selecting the visual studio toolchain.
I’m running ./gradlew :hal:hALDesktopSahredLibrary in git shell. Doesn’t work in Command Prompt either. Same error.

cl IS in the path!

the error message

:hal:addNiLibraryLinks
:hal:compileHALDesktopSharedLibraryHALDesktopCpp FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':hal:compileHALDesktopSharedLibraryHALDesktopCpp'.
> No tool chain is available to build for platform 'windows':
    - Tool chain 'gcc' (GNU GCC): Could not find C compiler 'gcc' in system path.
    - Tool chain 'macGcc' (Clang): Could not find C compiler 'clang' in system path.'

Why isn’t it asking about VisualCPP?
Here is the offending build.gradle

apply plugin: 'cpp'

model {
    platforms {
        arm {
            architecture 'arm'
            operatingSystem 'linux'
        }
        desktop {
            architecture 'x86_64'
        }
    }
    components {
        HALDesktop(NativeLibrarySpec) {
            targetPlatform 'windows'
            sources {
                cpp {
                    source {
                        srcDirs = ["lib/Desktop", "lib/Shared"]
                        includes = ["**/*.cpp"]
                    }
                    exportedHeaders {
                        srcDirs = ["include", "lib/Desktop", "lib/Shared"]
                    }
                }
            }
        }
    }
}

It looks like you’ve defines some tool chains somewhere (eg ‘macGcc’ isn’t the standard name for Clang). When you define any tool chains, you have to define all the tool chains you’d like to use, so you’ll also need to include VisualCpp if you want to use Visual C++ to build on windows.

Oh interesting–I didn’t know that. Am I correct in saying that I wasn’t listing my own toolchains, it should just find it?