palantir / gradle-graal

A plugin for Gradle that adds tasks to download, extract and interact with GraalVM tooling.
Apache License 2.0
227 stars 27 forks source link

Windows SDK 7.1 incompatible with Windows 10 #399

Open ThatBlockyPenguin opened 3 years ago

ThatBlockyPenguin commented 3 years ago

What happened?

When running :nativeImage, gradle-graal complains that it can't find Windows SDK 7.1. That doesn't surprise me, I'm running Windows 10. After chasing many blog threads on the internet and not being able to install WinSDK 7.1 (due to incompatibilities), I still cannot use gradle-graal on Windows 10.

Possible Fixes?

As it's now 2020, 5 years after Windows 10's release, could you update gradle-graal to use WinSDK 10? Or, if possible, add a configuration option for which SDK to use, if you want to keep support in place for Windows 7 machines.

Thanks!

yschimke commented 3 years ago

I've ended up with gradle build config like so to support Windows 10

https://github.com/square/okhttp/blob/master/okcurl/build.gradle#L57-L62

But it still fails if classpath is too long and similar problems.

TeHMoroS commented 3 years ago

When using Java 11 and VS Build Tools only (I could probably use VS Community, but I'm pretty happy with ma VSCode setup), you can "help" gradle-graal with locating the needed toolchain by supplying the variables mentioned in the config:

graal {
    javaVersion '11'

...

    // adjust as needed
    windowsVsVersion '2019'
    windowsVsEdition 'BuildTools'
}

Either that or, as Yuri mentioned above, the whole path.