-
-
Field Summary
Fields Modifier and Type Field Description private final DirectoryPropertydownloadDirprivate final Property<Int>parallelLevelprivate final ListProperty<String>localFilePatternsprivate final List<G>groupsprivate final List<File>filesprivate final CommonExtensioncommon
-
Constructor Summary
Constructors Constructor Description Resolver(CommonExtension common)
-
Method Summary
Modifier and Type Method Description final List<G>resolveGroups(String groupName)final List<File>groupFiles(String name)final Ggroup(String name)final Unitgroup(String name, Function1<Resolver<G>, Unit> configurer)final Unitgroup(String name, String downloadUrl)Shorthand for creating named group with single file only to be downloaded. final UnitgetAll(Array<Out Any> values)Resolve files in case of various type of specified value: file, url to file, dependency notation, project dependency. final UnitgetAll(Iterable<Any> values)Resolve files in case of various type of specified value: file, url to file, dependency notation, project dependency. final FileResolutionget(Object value)Resolve file in case of various type of specified value: file, url to file, dependency notation, project dependency. final FileResolutionresolve(Object dependencyNotation)Resolve file by dependency notation using defined Gradle repositories (Maven, Ivy etc). final List<FileResolution>download(String urlDir, Array<Out String> fileNames)Download files from same URL using automatically determined file transfer (HTTP, SFTP, SMB, URL, local file system). final List<FileResolution>download(String urlDir, Iterable<String> fileNames)Download files from same URL using automatically determined file transfer (HTTP, SFTP, SMB, URL, local file system). final FileResolutiondownload(String url)Download file using automatically determined file transfer (HTTP, SFTP, SMB, URL, local file system). final FileResolutiondownloadHttp(String url, Function1<HttpFileTransfer, Unit> options)Download file using HTTP file transfer with custom settings (like basic auth credentials). final FileResolutiondownloadSftp(String url, Function1<SftpFileTransfer, Unit> options)Download file using SFTP file transfer with custom settings (different credentials). final FileResolutiondownloadSmb(String url, Function1<SmbFileTransfer, Unit> options)Download file using SMB file transfer with custom settings (different credentials, domain). final FileResolutionuseLocal(String path)Use local file directly (without copying). final FileResolutionuseLocal(File sourceFile)Use local file directly (without copying). final FileResolutionuseLocalBy(Object dir, Iterable<String> filePatterns, Function1<Iterable<File>, File> selector)Use local file from directory or file when not found any. final FileResolutionuseLocalBy(Object dir, Function1<Iterable<File>, File> selector)Use local file from directory or file when not found any. final FileResolutionuseLocalLastNamed(Object dir)Use local file with name being highest version located in directory or fail when not found any. final FileResolutionuseLocalLastModified(Object dir)Use last modified local file located in directory or fail when not found any. final FileResolutionuseLocalRecent(Object dir)Use last modified local file located in directory or fail when not found any. final Unitconfig(Function1<G, Unit> configurer)Customize configuration for particular file group. final Unitinvoke(String $self, Function1<Resolver<G>, Unit> groupDefiner)final Unitinvoke(String $self, Array<Out Any> values)final Unitinvoke(String $self, Object value, Function1<G, Unit> groupOptions)final Unitinvoke(String $self, Iterable<Any> values, Function1<G, Unit> groupOptions)abstract GcreateGroup(String name)final DirectoryPropertygetDownloadDir()final Property<Int>getParallelLevel()Controls count of groups resolved in parallel. final ListProperty<String>getLocalFilePatterns()Files respected when searching for recent local files. final List<G>getGroups()final List<File>getFiles()final CommonExtensiongetCommon()-
-
Constructor Detail
-
Resolver
Resolver(CommonExtension common)
-
-
Method Detail
-
resolveGroups
final List<G> resolveGroups(String groupName)
-
groupFiles
final List<File> groupFiles(String name)
-
group
final Unit group(String name, String downloadUrl)
Shorthand for creating named group with single file only to be downloaded.
-
getAll
final Unit getAll(Array<Out Any> values)
Resolve files in case of various type of specified value: file, url to file, dependency notation, project dependency.
-
getAll
final Unit getAll(Iterable<Any> values)
Resolve files in case of various type of specified value: file, url to file, dependency notation, project dependency.
-
get
final FileResolution get(Object value)
Resolve file in case of various type of specified value: file, url to file, dependency notation, project dependency.
-
resolve
final FileResolution resolve(Object dependencyNotation)
Resolve file by dependency notation using defined Gradle repositories (Maven, Ivy etc).
-
download
final List<FileResolution> download(String urlDir, Array<Out String> fileNames)
Download files from same URL using automatically determined file transfer (HTTP, SFTP, SMB, URL, local file system).
-
download
final List<FileResolution> download(String urlDir, Iterable<String> fileNames)
Download files from same URL using automatically determined file transfer (HTTP, SFTP, SMB, URL, local file system).
-
download
final FileResolution download(String url)
Download file using automatically determined file transfer (HTTP, SFTP, SMB, URL, local file system).
-
downloadHttp
final FileResolution downloadHttp(String url, Function1<HttpFileTransfer, Unit> options)
Download file using HTTP file transfer with custom settings (like basic auth credentials).
-
downloadSftp
final FileResolution downloadSftp(String url, Function1<SftpFileTransfer, Unit> options)
Download file using SFTP file transfer with custom settings (different credentials).
-
downloadSmb
final FileResolution downloadSmb(String url, Function1<SmbFileTransfer, Unit> options)
Download file using SMB file transfer with custom settings (different credentials, domain).
-
useLocal
final FileResolution useLocal(String path)
Use local file directly (without copying).
-
useLocal
final FileResolution useLocal(File sourceFile)
Use local file directly (without copying).
-
useLocalBy
final FileResolution useLocalBy(Object dir, Iterable<String> filePatterns, Function1<Iterable<File>, File> selector)
Use local file from directory or file when not found any.
-
useLocalBy
final FileResolution useLocalBy(Object dir, Function1<Iterable<File>, File> selector)
Use local file from directory or file when not found any.
-
useLocalLastNamed
final FileResolution useLocalLastNamed(Object dir)
Use local file with name being highest version located in directory or fail when not found any.
-
useLocalLastModified
final FileResolution useLocalLastModified(Object dir)
Use last modified local file located in directory or fail when not found any.
-
useLocalRecent
final FileResolution useLocalRecent(Object dir)
Use last modified local file located in directory or fail when not found any.
-
config
final Unit config(Function1<G, Unit> configurer)
Customize configuration for particular file group.
-
createGroup
abstract G createGroup(String name)
-
getDownloadDir
final DirectoryProperty getDownloadDir()
-
getParallelLevel
final Property<Int> getParallelLevel()
Controls count of groups resolved in parallel.
-
getLocalFilePatterns
final ListProperty<String> getLocalFilePatterns()
Files respected when searching for recent local files.
-
getCommon
final CommonExtension getCommon()
-
-
-
-