gradle/gradle — pull request #228 by mputters (2013-12-07 12:44:08+00:00)
Title: Registry-based Windows SDK detection

These commits modify the behavior of the Windows SDK detection. They also attempt to start reducing Windows SDK dependencies in the Visual C++ toolchain (since VC++ can be used without a Windows SDK) by separating the VisualStudioLocator from a new WindowsSdkLocator.

The new detection behavior is the following:

1. detect any available and valid Windows SDK from the registry, keeping track of its path, version and name
2. detect any available and valid Windows Kit from the registry, keeping track of its path, version and name
3. detect any available and valid Windows SDK on the ``PATH``, making it the default SDK
4. detect any available and valid Windows SDK at a provided location, making it the default SDK
5. if no default SDK has been picked, select the highest available version

An additional ``windowsSdk`` property is now available to specify which Windows SDK version to use.

Special versions:
"path" can be used to force using the Windows SDK available on the ``PATH`` (default behavior unless ``windowsSdkDir`` is provided)
"user" can be used to force using the Windows SDK provided via ``windowsSdkDir`` (default behavior if a ``windowsSdkDir`` is provided)

Versions found in the registry are trimmed down, eg:
``7.0`` from Microsoft Windows SDK for Visual Studio 2010, 7.0.30319
``7.1`` from Microsoft Windows SDK for Windows 7 (7.1.7600.0.30514), 7.1.7600.0.30514

Versions with no provided name get a generated name, eg:
``Windows SDK 7.1`` from no-name, 7.1.51106
``Path-resolved Windows SDK`` from a ``PATH``-resolved SDK
``User-provided Windows SDK`` from a ``windowsSdkDir``-provided SDK

Maybe (as a next pull request) adding a task ``availableWindowsSdk`` could be nice, listing all the Windows SDK available? Then have the same for ``availableVisualCpp``, etc. I'm just not sure on the right task name to use for this.