public class DownloadAction extends java.lang.Object implements DownloadSpec
| Constructor and Description |
|---|
DownloadAction() |
| Modifier and Type | Method and Description |
|---|---|
void |
dest(java.lang.Object dest)
Sets the download destination
|
void |
execute(org.gradle.api.Project project)
Starts downloading
|
java.io.File |
getDest() |
java.lang.String |
getPassword() |
java.net.URL |
getSrc() |
java.lang.String |
getUsername() |
boolean |
isOnlyIfNewer() |
boolean |
isOverwrite() |
boolean |
isQuiet() |
void |
onlyIfNewer(boolean onlyIfNewer)
Sets the onlyIfNewer flag
|
void |
overwrite(boolean overwrite)
Sets the overwrite flag
|
void |
password(java.lang.String password)
Sets the password for
Basic authentication |
void |
quiet(boolean quiet)
Sets the quiet flag
|
void |
src(java.lang.Object src)
Sets the download source URL
|
void |
username(java.lang.String username)
Sets the username for
Basic authentication |
public void execute(org.gradle.api.Project project)
throws java.io.IOException
project - the project to be builtjava.io.IOException - if the file could not downloadedpublic void src(java.lang.Object src)
throws java.net.MalformedURLException
DownloadSpecsrc in interface DownloadSpecsrc - the URLjava.net.MalformedURLException - if the download source is not a URLpublic void dest(java.lang.Object dest)
DownloadSpecdest in interface DownloadSpecdest - a file or directory where to store the retrieved filepublic void quiet(boolean quiet)
DownloadSpecquiet in interface DownloadSpecquiet - true if download progress should not be loggedpublic void overwrite(boolean overwrite)
DownloadSpecoverwrite in interface DownloadSpecoverwrite - true if existing files should be overwritten, false otherwisepublic void onlyIfNewer(boolean onlyIfNewer)
DownloadSpeconlyIfNewer in interface DownloadSpeconlyIfNewer - true if the file should only be downloaded if it
has been modified on the server since the last downloadpublic void username(java.lang.String username)
DownloadSpecBasic authenticationusername in interface DownloadSpecusername - the usernamepublic void password(java.lang.String password)
DownloadSpecBasic authenticationpassword in interface DownloadSpecpassword - the passwordpublic java.net.URL getSrc()
getSrc in interface DownloadSpecpublic java.io.File getDest()
getDest in interface DownloadSpecpublic boolean isQuiet()
isQuiet in interface DownloadSpecpublic boolean isOverwrite()
isOverwrite in interface DownloadSpecpublic boolean isOnlyIfNewer()
isOnlyIfNewer in interface DownloadSpecpublic java.lang.String getUsername()
getUsername in interface DownloadSpecBasic authenticationpublic java.lang.String getPassword()
getPassword in interface DownloadSpecBasic authentication