Extension for global configuration of handling distributions used for testing.
Type | Name and description |
---|---|
AvailableDistributions |
distributions Manages the set of available distributions. |
boolean |
download If required distributions are not available locally, download them. |
boolean |
downloadToGradleUserHome When downloading distributions store them in gradle.gradleUserHomeDir .
|
boolean |
includeGradleHome Consider the current Gradle distribution the script runs under when searching for distributions. |
boolean |
searchGradleUserHome Consider the distributions gradle.gradleUserHomeDir
when searching for distributions. |
boolean |
searchGvm Search the GVM installation folder for Gradle distributions. |
boolean |
useGradleSite Allow downloading from the global Gradle distribution site. |
Constructor and description |
---|
GradleTestExtension
(org.gradle.api.Project p) |
Type | Name and description |
---|---|
static void |
addAvailableDistributions(GradleTestExtension ext) |
java.util.Set<java.io.File> |
getSearchFolders() A list of additional folders to search. |
java.util.List<java.net.URI> |
getUris() Returns a list of URIs which should be tried to download Gradle distributions from |
void |
search(java.lang.Object... files) Adds a list of file paths that can be searched |
void |
uri(java.lang.Object... u) Provide one or more URIs to be tried for downloading Gradle distributions. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Manages the set of available distributions.
If null
, default until such time that its gets set during the
evaluation phase.
If required distributions are not available locally, download them.
Default is true
.
Note that if grdle is run with the --offline
switch then downloads
will not be performed.
When downloading distributions store them in gradle.gradleUserHomeDir
.
This might save time in future working with multiple distributions or even re-running
the build again. It does however, mean that your build script affects user configuration,
which is not necessarily in the Gradle spirit.
Default is false
.
Consider the current Gradle distribution the script runs under
when searching for distributions. Default is true
.
Consider the distributions gradle.gradleUserHomeDir
when searching for distributions. Default is true
.
Search the GVM installation folder for Gradle distributions.
Default is true
.
Allow downloading from the global Gradle distribution site.
Default is true
.
A list of additional folders to search. These will be search in both gradleUserHome
and
GVM_HOME/gradle
style.
Returns a list of URIs which should be tried to download Gradle distributions from
Adds a list of file paths that can be searched
files
- One or more objects convertible to File objects using project.files
Provide one or more URIs to be tried for downloading Gradle distributions.
u
- One or more objects convertible to URIsGroovy Documentation