|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gradle.tooling.GradleConnector
public class GradleConnector
A GradleConnector is the main entry point to the Gradle tooling API. You use this API as follows:
newConnector() to create a new connector instance.connect() to create the connection to a build.close() to clean up.GradleConnector instances are not thread-safe.
| Method Summary | |
|---|---|
void |
close()
Closes this connector and all connections created by it. |
BuildConnection |
connect()
Creates a connection to the build in the specified project directory. |
GradleConnector |
forProjectDirectory(File projectDir)
Specifies the working directory to use. |
static GradleConnector |
newConnector()
Creates a new connector instance. |
GradleConnector |
useDistribution(URI gradleDistribution)
Specifies which Gradle distribution to use. |
GradleConnector |
useGradleVersion(String gradleVersion)
Specifies which Gradle version to use. |
GradleConnector |
useInstallation(File gradleHome)
Specifies which Gradle installation to use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static GradleConnector newConnector()
public GradleConnector useInstallation(File gradleHome)
useDistribution(java.net.URI) or useGradleVersion(String).
gradleHome - The Gradle installation directory.
public GradleConnector useGradleVersion(String gradleVersion)
useInstallation(java.io.File) or useDistribution(java.net.URI).
gradleVersion - The version to use.
public GradleConnector useDistribution(URI gradleDistribution)
useInstallation(java.io.File) or useGradleVersion(String).
gradleDistribution - The distribution to use.
public GradleConnector forProjectDirectory(File projectDir)
projectDir - The working directory.
public BuildConnection connect()
throws GradleConnectionException
UnsupportedVersionException - When the target Gradle version does not support this version of the tooling API.
GradleConnectionException - On failure to establish a connection with the target Gradle version.public void close()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||