@@ -220,8 +220,8 @@ has been modified on the server since the last download <em>(default:
220220be applied to each source URL before it is downloaded. The action is called
221221with a <a href =" #downloaddetails " >DownloadDetails</a > object and can modify
222222some aspects of the target file in the destination directory (e.g. the
223- filename). If only one download source has been given, adding an
224- <code >eachFile</code > action will make the plugin fail.</dd >
223+ filename or relative path ). If only one download source has been given, adding
224+ an <code >eachFile</code > action will make the plugin fail.</dd >
225225</dl >
226226
227227<em >Tip!</em > You may provide Groovy Closures or Kotlin Lambdas to the ` src `
@@ -373,7 +373,7 @@ DownloadDetails
373373If you specify an [ ` eachFile ` ] ( #general ) action, it will be called with an
374374instance of the ` DownloadDetails ` class, which provides details about a
375375download source and its target file. It can be used to change some aspects of
376- the target file (e.g. its name).
376+ the target file (e.g. its name or relative path ).
377377
378378The ` DownloadDetails ` class provides the following methods:
379379
@@ -384,6 +384,16 @@ The `DownloadDetails` class provides the following methods:
384384<dd >Get the name of the target file</dd >
385385<dt >void setName(String)</dt >
386386<dd >Set the name of the target file</dd >
387+ <dt >String getPath()</dt >
388+ <dd >Get the path of the target file (including the filename), relative to
389+ download directory</dd >
390+ <dt >void setPath(String)</dt >
391+ <dd >Set the path of the target file (including the filename)</dd >
392+ <dt ><a href =" https://docs.gradle.org/current/javadoc/org/gradle/api/file/RelativePath.html " >RelativePath</a > getRelativePath()</dt >
393+ <dd >Get the path of the target file (including the filename), relative to
394+ download directory</dd >
395+ <dt >void setRelativePath(<a href =" https://docs.gradle.org/current/javadoc/org/gradle/api/file/RelativePath.html " >RelativePath</a > path)</dt >
396+ <dd >Set the path of the target file (including the filename)</dd >
387397</dl >
388398
389399Proxy configuration
0 commit comments