VerifyBuildEnvironmentPlugin.kt

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Use the public `JavaInstallation` API to query and validate the build and test JVM metadata, instead of using a bunch of internal APIs.

  1. … 6 more files in changeset.
Use the public `JavaInstallation` API to query and validate the build and test JVM metadata, instead of using a bunch of internal APIs.

  1. … 6 more files in changeset.
Use the public `JavaInstallation` API to query and validate the build and test JVM metadata, instead of using a bunch of internal APIs.

  1. … 6 more files in changeset.
Use the public `JavaInstallation` API to query and validate the build and test JVM metadata, instead of using a bunch of internal APIs.

  1. … 6 more files in changeset.
Use the public `JavaInstallation` API to query and validate the build and test JVM metadata, instead of using a bunch of internal APIs.

  1. … 6 more files in changeset.
Use the public `JavaInstallation` API to query and validate the build and test JVM metadata, instead of using a bunch of internal APIs.

  1. … 6 more files in changeset.
Some polishing of the build logic to locate the various JVMs used by the build.

- Apply the `AvailableJavaInstallationsPlugin` to all projects, rather than the root project.

- Add some modelling to the extension added by the plugin.

- Make sure the plugins that expect the extension to be present to explicitly state this (by applying the plugin).

  1. … 7 more files in changeset.
Some polishing of the build logic to locate the various JVMs used by the build.

- Apply the `AvailableJavaInstallationsPlugin` to all projects, rather than the root project.

- Add some modelling to the extension added by the plugin.

- Make sure the plugins that expect the extension to be present to explicitly state this (by applying the plugin).

  1. … 7 more files in changeset.
Some polishing of the build logic to locate the various JVMs used by the build.

- Apply the `AvailableJavaInstallationsPlugin` to all projects, rather than the root project.

- Add some modelling to the extension added by the plugin.

- Make sure the plugins that expect the extension to be present to explicitly state this (by applying the plugin).

  1. … 7 more files in changeset.
Rework the discovery and validation of the JVMs used for building, compiling and testing Gradle, so that the implementation is compatible with instant execution.

In particular, model the `AvailableJavaInstallations` as a 'build service', in part to dogfood this API. Also remove some logic that is no longer required.

  1. … 6 more files in changeset.
Rework the discovery and validation of the JVMs used for building, compiling and testing Gradle, so that the implementation is compatible with instant execution.

In particular, model the `AvailableJavaInstallations` as a 'build service', in part to dogfood this API. Also remove some logic that is no longer required.

  1. … 6 more files in changeset.
Rework the discovery and validation of the JVMs used for building, compiling and testing Gradle, so that the implementation is compatible with instant execution.

In particular, model the `AvailableJavaInstallations` as a 'build service', in part to dogfood this API. Also remove some logic that is no longer required.

  1. … 6 more files in changeset.
Fix AvailableJavaInstallations for instant execution

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 1 more file in changeset.
Fix AvailableJavaInstallations for instant execution

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 1 more file in changeset.
Fix AvailableJavaInstallations for instant execution

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 1 more file in changeset.
Fix AvailableJavaInstallations for instant execution

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 1 more file in changeset.
Fix AvailableJavaInstallations for instant execution

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 1 more file in changeset.
Fix AvailableJavaInstallations for instant execution

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 1 more file in changeset.
Make build JDK validation fail fast (#7372)

See https://github.com/gradle/gradle-private/issues/1579

Previously we check the build JDK in the execution phase, which might be too late - users

don't like to wait 5 mins for buildSrc then see "current JDK is not supported".

This PR moves the build JDK validation at the beginning of buildSrc/build.gradle.kts

in order to get a quick feedback.

  1. … 5 more files in changeset.
Remove dependency on Java 7 in our build (#6494)

### Context

Currently we need 3 JDKs to build Gradle:

- Java 7 to compile most code

- Our build runs on Java 8

- Java 9 to compile some code using Java 9 API.

Our goal is to use only one JDK. After this PR, we can:

- If running the build on Java 9/10, we can only use a single JDK.

- If running the build on Java 8, we still need an extra JDK to compile some code using Java 9 API. After we migrate all CI builds to Java 9/10, we may completely drop the support for running on Java 8.

However, with https://youtrack.jetbrains.com/issue/IDEA-197550 unsolved, we still can't run Gradle integration tests in IDEA with JDK 10. Everything else would work fine on JDK10.

#### Remove multiple compiler JDKs

Previously, we use different JDKs to compile different subprojects, which made things really complicated. This PR greatly simplify the compiler selection code, after this PR, we only need one single Java9-compatible JDK to compile all code.

#### Refine verification mechanism

Previously, we had verification for:

- If build cache enabled, verify the current build is running on Java 8 because CI is running on Java 8.

- If running some specific tasks (e.g. distribution generation), verify the build/compiler JDK is Oracle JDK.

This PR does the following improvements:

- Since all `Compile` tasks share a common compiler, verify that compiler is Java9-compatible. Oracle JDK is not mandatory.

- If running some specific tasks (e.g. distribution generation), verify the build/compiler JDK is Oracle JDK.

This PR collects these verification into a single plugin, instead of code everywhere previously.

    • -0
    • +48
    ./VerifyBuildEnvironmentPlugin.kt
  1. … 14 more files in changeset.