abstract class Resolver<G : FileGroup>
File downloader with groups supporting files from multiple sources: local and remote (SFTP, SMB, HTTP).
<init> |
File downloader with groups supporting files from multiple sources: local and remote (SFTP, SMB, HTTP). Resolver(aem: AemExtension, downloadDir: File) |
aem |
val aem: AemExtension |
allFiles |
val allFiles: List<File> |
downloadDir |
val downloadDir: File |
groups |
val groups: List<G> |
localFilePatterns |
Files respected when searching for recent local files. var localFilePatterns: List<String> |
outputDirs |
val outputDirs: List<File> |
parallelLevel |
Controls count of groups resolved in parallel. var parallelLevel: Int |
allFiles |
fun allFiles(filter: G.() -> Boolean): List<File> |
allGroups |
fun allGroups(filter: G.() -> Boolean): List<G> |
config |
Customize configuration for particular file group. fun config(configurer: G.() -> Unit): Unit |
createGroup |
abstract fun createGroup(name: String): G |
download |
Download files from same URL using automatically determined file transfer (HTTP, SFTP, SMB, URL, local file system). fun download(urlDir: String, vararg fileNames: String): List<FileResolution>fun download(urlDir: String, fileNames: Iterable<String>): List<FileResolution>
Download file using automatically determined file transfer (HTTP, SFTP, SMB, URL, local file system). fun download(url: String): FileResolution |
downloadHttp |
Download file using HTTP file transfer with custom settings (like basic auth credentials). fun downloadHttp(url: String, options: HttpFileTransfer.() -> Unit): FileResolution |
downloadSftp |
Download file using SFTP file transfer with custom settings (different credentials). fun downloadSftp(url: String, options: SftpFileTransfer.() -> Unit): FileResolution |
downloadSmb |
Download file using SMB file transfer with custom settings (different credentials, domain). fun downloadSmb(url: String, options: SmbFileTransfer.() -> Unit): FileResolution |
get |
Resolve file in case of various type of specified value: file, url to file, dependency notation, project dependency. fun get(value: Any): FileResolution |
group |
fun group(name: String): Gfun group(name: String, configurer: Resolver<G>.() -> Unit): Unit
Shorthand for creating named group with single file only to be downloaded. fun group(name: String, downloadUrl: String): Unit |
invoke |
operator fun String.invoke(value: Any): Unitoperator fun String.invoke(url: String, vararg fileNames: String): Unitoperator fun String.invoke(configurer: Resolver<G>.() -> Unit): Unit |
outputDirs |
fun outputDirs(filter: G.() -> Boolean): List<File> |
resolve |
Resolve file by dependency notation using defined Gradle repositories (Maven, Ivy etc). fun resolve(dependencyNotation: String): FileResolution
Resolve file using defined Gradle repositories (Maven, Ivy etc). fun resolve(dependencyOptions: DependencyOptions.() -> Unit): FileResolution |
useLocal |
Use local file directly (without copying). fun useLocal(path: String): FileResolutionfun useLocal(sourceFile: File): FileResolution |
useLocalBy |
Use local file from directory or file when not found any. fun useLocalBy(dir: Any, filePatterns: Iterable<String>, selector: Iterable<File>.() -> File?): FileResolution?fun useLocalBy(dir: Any, selector: Iterable<File>.() -> File?): FileResolution? |
useLocalLastModified |
Use last modified local file located in directory or fail when not found any. fun useLocalLastModified(dir: Any): FileResolution? |
useLocalLastNamed |
Use local file with name being highest version located in directory or fail when not found any. Highest version is determined by descending alphanumeric sorting. fun useLocalLastNamed(dir: Any): FileResolution? |
useLocalRecent |
Use last modified local file located in directory or fail when not found any. fun useLocalRecent(dir: Any): FileResolution? |
GROUP_DEFAULT |
const val GROUP_DEFAULT: String |
FileResolver |
open class FileResolver : Resolver<FileGroup> |
PackageResolver |
class PackageResolver : Resolver<PackageGroup> |