Add test case for `10-internal`
13 Jul 17 c1fe5e40a76b79a98e8916c2ce3b4e1e6ed3f343
Support running Gradle on JDK 10
This commit adds support for `JavaVersion.1_10` (yes, this is awkward naming, blame versioning scheme change).
Note that there are 2 different aspects of Java 10 detection:
1. given a string representation of a version number, return the appropriate `JavaVersion` enum value
2. given the current runtime, return the appropriate `JavaVersion` enum value
This commit fixes 1, but didn't change anything in the way 2 works. In particular, 2 still uses the `java.version`
property, which is then parsed and we follow the process of 1. However, since Java 9, a new `Runtime#getVersion`
method exists, that we should use instead of relying on parsing the version number returned by `java.version`.
The reason we don't do this yet is that Gradle needs to run on older JDKs, so we cannot statically link to this
method, which involves either the use of reflection or method handles to get a hand on the result of the invocation.
Since the invocation returns a complex object (not just a `String`), we're deferring this work (PRs welcome!).
13 Jul 17 500485df3a1898d4637bfa42b73e356941b4af91