Informs about the build environment, like Gradle version or the Java home in use.
Example:
ProjectConnection connection = GradleConnector.newConnector() .forProjectDirectory(new File("someProjectFolder")) .connect(); try { BuildEnvironment env = connection.getModel(BuildEnvironment.class); System.out.println("Gradle version: " + env.getGradle().getGradleVersion()); System.out.println("Java home: " + env.getJava().getJavaHome()); } finally { connection.close(); }
Type | Name and description |
---|---|
BuildIdentifier |
getBuildIdentifier() Returns the identifier for the Gradle project that these invocations originate from. |
GradleEnvironment |
getGradle() Returns information about the Gradle environment, for example the Gradle version. |
JavaEnvironment |
getJava() Returns information about the Java environment, for example the Java home or the JVM args used. |
Returns the identifier for the Gradle project that these invocations originate from.
Returns information about the Gradle environment, for example the Gradle version.
Returns information about the Java environment, for example the Java home or the JVM args used.