Skip the Gradle Plugin when building with JDK 10

Previously, the JDK 10 build would fail as we build the plugin using
Gradle 4.0.x (the lowest version of Gradle that we support) and
Gradle 4.0.x doesn't work with Java 10.

Upgrading to Gradle 4.1, which appears to work with Java 10, was
considered but rejected for now as it introduces the risk that we
inadvertently use an API that's new in 4.1 and break our 4.0 support.

This commit goes for the extreme option and disables building the
Gradle Plugin when building with JDK.

See gh-12028
pull/12324/head
Andy Wilkinson 7 years ago
parent 20654b9bc9
commit 2b1252e282

@ -15,6 +15,7 @@
<main.basedir>${basedir}/../../..</main.basedir>
<gradle.executable>./gradlew</gradle.executable>
<gradle.task>build</gradle.task>
<skip.gradle.build>false</skip.gradle.build>
</properties>
<dependencies>
<dependency>
@ -84,6 +85,7 @@
<argument>-Pdescription=${project.description}</argument>
<argument>-S</argument>
</arguments>
<skip>${skip.gradle.build}</skip>
</configuration>
<goals>
<goal>exec</goal>
@ -118,6 +120,7 @@
<classifier>sources</classifier>
</artifact>
</artifacts>
<skipAttach>${skip.gradle.build}</skipAttach>
</configuration>
</execution>
</executions>
@ -302,5 +305,14 @@
</plugins>
</build>
</profile>
<profile>
<id>java10</id>
<activation>
<jdk>10</jdk>
</activation>
<properties>
<skip.gradle.build>true</skip.gradle.build>
</properties>
</profile>
</profiles>
</project>

Loading…
Cancel
Save