|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface BuildEnvironment
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();
}
| Method Summary | |
|---|---|
GradleEnvironment |
getGradle()
Informs about the Gradle environment, for example the Gradle version. |
JavaEnvironment |
getJava()
Informs about the Java environment, for example the Java home or the JVM args used. |
| Method Detail |
|---|
GradleEnvironment getGradle()
JavaEnvironment getJava()
throws UnsupportedMethodException
UnsupportedMethodException - when the Gradle version the tooling API is connected to does not support the Java environment information.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||