common-plugin
Module Contents
alltypes
Module Contents
abstract class AbstractFileTransfer : FileTransferHandler, Serializable
open class Await : RuntimeDefaultTask
object Behaviors
class BuildScope
class CollectingLogger
abstract class CommonDefaultPlugin : Plugin<Project>
open class CommonDefaultTask : DefaultTask, CommonTask
open class CommonException : GradleException
open class CommonExtension
class CommonPlugin : Plugin<Project>
interface CommonTask : Task
class CustomFileTransfer : ProtocolFileTransfer
Module Contents
CustomFileTransfer(common: CommonExtension)
fun delete(callback: (dirUrl: String, fileName: String) -> Unit): Unit
fun deleteFrom(dirUrl: String, fileName: String): Unit
fun download(callback: (dirUrl: String, fileName: String, target: File) -> Unit): Unit
fun downloadFrom(dirUrl: String, fileName: String, target: File): Unit
fun exists(callback: (dirUrl: String, fileName: String) -> Boolean): Unit
fun exists(dirUrl: String, fileName: String): Boolean
fun list(callback: (dirUrl: String) -> List<FileEntry>): Unit
fun list(dirUrl: String): List<FileEntry>
lateinit var name: String
val parallelable: Provider<Boolean!>!
lateinit var protocols: List<String>
fun truncate(callback: (dirUrl: String) -> Unit): Unit
fun truncate(dirUrl: String): Unit
fun upload(callback: (dirUrl: String, fileName: String, target: File) -> Unit): Unit
fun uploadTo(dirUrl: String, fileName: String, source: File): Unit
class DelegatingFileAlterationListener : FileAlterationListener
class DependencyFile
open class Destroy : RuntimeDefaultTask
class DorkboxNotifier : Notifier
open class Down : RuntimeDefaultTask
class Event
enum class EventType
class FileContentReader : BaseFilterReader, ChainableReader
class FileDownloader
data class FileEntry
open class FileException : CommonException
open class FileGroup
open class FileResolution
Module Contents
FileResolution(group: FileGroup, id: String, resolver: (FileResolution) -> File)
fun archiveFile(archive: File, entryPattern: String): File
fun archiveFiles(archive: File, entriesPattern: String): Sequence<File>
fun archiveTree(archive: File): FileTree
fun copyArchiveFile(archive: File, entryPattern: String, target: File): File
fun copyArchiveFiles(archive: File, entriesPattern: String, targetDir: File): Unit
fun copyFile(source: File, target: File): Unit
fun copyToDirectory(source: File, targetDir: File): Unit
val dir: File
val file: File
val group: FileGroup
val id: String
fun resolve(): File
fun then(operation: FileResolution.(File) -> File): Unit
fun use(operation: FileResolution.(File) -> Unit): Unit
open class FileResolver : Resolver<FileGroup>
interface FileTransfer
Module Contents
open fun delete(fileUrl: String): Unit
abstract fun deleteFrom(dirUrl: String, fileName: String): Unit
open fun download(fileUrl: String, target: File): Unit
abstract fun download(fileUrl: String): File
abstract fun downloadFrom(dirUrl: String, fileName: String, target: File): Unit
open fun downloadTo(fileUrl: String, dir: File): File
open fun exists(fileUrl: String): Boolean
open fun exists(dirUrl: String, fileName: String): Boolean
abstract fun handles(fileUrl: String): Boolean
abstract fun list(dirUrl: String): List<FileEntry>
fun splitFileUrl(fileUrl: String): Pair<String, String>
abstract fun stat(dirUrl: String, fileName: String): FileEntry?
open fun stat(fileUrl: String): FileEntry?
abstract fun truncate(dirUrl: String): Unit
open fun upload(fileUrl: String, source: File): Unit
abstract fun uploadTo(dirUrl: String, fileName: String, source: File): Unit
open fun uploadTo(dirUrl: String, source: File): Unit
open class FileTransferException : CommonException
class FileTransferFactory
interface FileTransferHandler : FileTransfer
class FileTransferManager : FileTransfer
Module Contents
FileTransferManager(common: CommonExtension)
val credentials: Pair<String, String>
fun credentials(user: String?, password: String?, domain: String? = null): Unit
val credentialsString: String
fun custom(name: String, definition: CustomFileTransfer.() -> Unit): Unit
fun deleteFrom(dirUrl: String, fileName: String): Unit
val domain: Property<String!>!
fun download(fileUrl: String): File
fun downloadFrom(dirUrl: String, fileName: String, target: File): Unit
fun downloadUsing(transfer: FileTransfer, fileUrl: String, target: File): Unit
fun downloadUsing(transfer: FileTransfer, dirUrl: String, fileName: String, target: File): Unit
val factory: FileTransferFactory
fun handles(fileUrl: String): Boolean
fun handling(fileUrl: String): FileTransferHandler
val http: HttpFileTransfer
fun http(options: HttpFileTransfer.() -> Unit): Unit
fun list(dirUrl: String): List<FileEntry>
const val NAME: String
fun named(name: String): FileTransfer
val password: Property<String!>!
val path: PathFileTransfer
fun path(options: PathFileTransfer.() -> Unit): Unit
val resolve: ResolveFileTransfer
fun resolve(options: ResolveFileTransfer.() -> Unit): Unit
val sftp: SftpFileTransfer
fun sftp(options: SftpFileTransfer.() -> Unit): Unit
val smb: SmbFileTransfer
fun smb(options: SmbFileTransfer.() -> Unit): Unit
fun stat(dirUrl: String, fileName: String): FileEntry?
const val TMP_SUFFIX: String
fun truncate(dirUrl: String): Unit
fun uploadTo(dirUrl: String, fileName: String, source: File): Unit
fun uploadUsing(transfer: FileTransfer, fileUrl: String, source: File): Unit
fun uploadUsing(transfer: FileTransfer, dirUrl: String, fileName: String, source: File): Unit
val url: UrlFileTransfer
fun url(options: UrlFileTransfer.() -> Unit): Unit
val user: Property<String!>!
class FileUploader
open class FileWatcher
class FileWatcherException : CommonException
object Formats
Module Contents
fun asHtml(value: String): Document!
fun asHtml(input: InputStream): Document!
fun asJson(input: InputStream): DocumentContext!
fun asJson(value: String): DocumentContext!
fun asVersion(value: String, partsTaken: Int = 3): GradleVersion
fun asXml(value: String): Document!
fun asXml(input: InputStream): Document!
fun date(date: Date = Date()): String
fun dateAt(timestamp: Long, zoneId: ZoneId): Date
fun dateFileName(date: Date = Date()): String
fun duration(millis: Long): String
fun durationFit(thenMillis: Long, thenZoneId: ZoneId, durationMillis: Long): Boolean
fun durationSince(millis: Long): String
fun fileSize(file: File): String
fun fileSizeBytesToHuman(bytes: Long): String
fun <reified T : Any> fromJson(json: String): T
fun <T> fromJson(input: InputStream, clazz: Class<T>): T
fun <T> fromJson(json: String, clazz: Class<T>): T
fun fromJsonToMap(json: String): Map<String, Any?>
fun localDateTimeAt(timestamp: Long, zoneId: ZoneId): LocalDateTime
fun normalizePath(path: String): String
fun percent(current: Int, total: Int): String
fun percent(current: Long, total: Long): String
fun percentExplained(current: Int, total: Int): String
fun percentExplained(current: Long, total: Long): String
fun projectPath(file: File, project: Project): String
fun projectPath(path: String, project: Project): String
fun relativePath(path: String, basePath: String): String
fun rootProjectPath(file: File, project: Project): String
fun rootProjectPath(path: String, project: Project): String
fun toBase64(value: String): String
fun toJson(value: Any, pretty: Boolean = true): String
fun toJson(value: Map<String, Any?>, pretty: Boolean = true): String
fun toList(value: String?, delimiter: String = ","): List<String>?
fun toMap(value: String?, valueDelimiter: String = ",", keyDelimiter: String = "="): Map<String, String>?
fun toMd5(text: String): String
fun toPassword(value: String): String
fun versionAtLeast(actual: String, required: String): Boolean
fun versionUnknown(): GradleVersion!
open class HttpClient
Module Contents
HttpClient(common: CommonExtension)
fun asHtml(response: HttpResponse): Document
fun asHtml(htmlString: String): Document
fun asJson(response: HttpResponse): DocumentContext
fun asJson(jsonString: String): DocumentContext
fun <reified T : Any> asObjectFromJson(response: HttpResponse): T
fun <T> asObjectFromJson(response: HttpResponse, clazz: Class<T>): T
fun asStream(response: HttpResponse): InputStream
fun asString(response: HttpResponse): String
fun asXml(response: HttpResponse): Document
fun asXml(xmlString: String): Document
val authorizationPreemptive: Property<Boolean!>!
val baseUrl: Property<String!>!
open fun baseUrl(uri: String): String
var basicCredentials: Pair<String?, String?>
val basicPassword: Property<String!>!
val basicUser: Property<String!>!
fun checkHtml(response: HttpResponse, validator: Document.() -> Boolean): Unit
fun checkStatus(response: HttpResponse, statusCodes: IntRange = STATUS_CODE_VALID): Unit
fun checkStatus(response: HttpResponse, statusCode: Int): Unit
fun checkStatus(response: HttpResponse, statusCodes: List<Int>): Unit
fun checkText(response: HttpResponse, containedText: String, ignoreCase: Boolean = true): Unit
val client: CloseableHttpClient!
fun clientBuilder(builder: HttpClientBuilder.() -> Unit): Unit
val connectionIgnoreSsl: Property<Boolean!>!
val connectionRetries: Property<Boolean!>!
val connectionTimeout: Property<Int!>!
open fun createEntityMultipart(params: Map<String, Any?>): HttpEntity
open fun createEntityUrlencoded(params: Map<String, Any?>): HttpEntity
fun delete(uri: String): Unit
fun <T> delete(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> delete(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpDelete.() -> Unit): T
fun download(fileUrl: String): File
fun download(fileUrl: String, target: File): Unit
fun downloadTo(fileUrl: String, dir: File): File
open fun <T> execute(method: HttpRequestBase, handler: HttpClient.(HttpResponse) -> T): T
fun execute(method: HttpRequestBase): Unit
fun get(uri: String): Unit
fun <T> get(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> get(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpGet.() -> Unit): T
fun head(uri: String): Unit
fun <T> head(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> head(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpHead.() -> Unit): T
val multipartBinaryType: Property<ContentType!>!
val multipartTextType: Property<ContentType!>!
fun patch(path: String): Unit
fun <T> patch(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> patch(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpPatch.() -> Unit): T
fun post(url: String, params: Map<String, Any?> = mapOf()): Unit
fun <T> post(uri: String, params: Map<String, Any?> = mapOf(), handler: HttpClient.(HttpResponse) -> T): T
fun <T> post(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> post(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpPost.() -> Unit): T
fun postMultipart(uri: String, params: Map<String, Any?> = mapOf()): Unit
fun <T> postMultipart(uri: String, params: Map<String, Any?> = mapOf(), handler: HttpClient.(HttpResponse) -> T): T
fun postUrlencoded(uri: String, params: Map<String, Any?> = mapOf()): Unit
fun <T> postUrlencoded(uri: String, params: Map<String, Any?> = mapOf(), handler: HttpClient.(HttpResponse) -> T): T
val proxyHost: Property<String!>!
val proxyPort: Property<Int!>!
val proxyScheme: Property<String!>!
fun put(uri: String): Unit
fun <T> put(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> put(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpPut.() -> Unit): T
fun <T> request(method: String, uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun requestConfigurer(configurer: HttpRequestBase.() -> Unit): Unit
fun responseChecker(checker: (HttpResponse) -> Unit): Unit
val responseChecks: Property<Boolean!>!
fun responseHandler(handler: (HttpResponse) -> Unit): Unit
val STATUS_CODE_VALID: IntRange
open fun throwStatusException(response: HttpResponse): Unit
fun HttpClientBuilder.useDefaults(): Unit
open class HttpException : CommonException
class HttpFileException : FileException
class HttpFileTransfer : ProtocolFileTransfer
open class JarTask : Jar, CommonTask
class JsonPassword : JsonSerializer<String>
kotlin.collections.Iterable
interface Notifier
class NotifierFacade
Module Contents
val common: CommonExtension
fun config(config: NotifierFacade.() -> Notifier): Unit
fun custom(notifier: (title: String, text: String, level: LogLevel, onClick: (Notify) -> Unit) -> Unit): Notifier
fun dorkbox(configurer: Notify.() -> Unit = {}): Notifier
val enabled: Property<Boolean!>!
fun error(title: String, text: String): Unit
val iconFailure: RegularFileProperty!
val iconSuccess: RegularFileProperty!
fun info(title: String, text: String): Unit
fun lifecycle(title: String, text: String): Unit
fun log(title: String): Unit
fun log(title: String, message: String): Unit
fun log(title: String, message: String, level: LogLevel): Unit
fun notify(title: String): Unit
fun notify(title: String, text: String, level: LogLevel, onClick: (Notify) -> Unit = {}): Unit
fun notify(title: String, text: String): Unit
fun of(common: CommonExtension): NotifierFacade
fun warn(title: String, text: String): Unit
class ObjectFactory
org.gradle.api.Project
org.gradle.api.tasks.TaskProvider
object Parallel
Module Contents
fun <A> each(iterable: Iterable<A>, callback: CoroutineScope.(A) -> Unit): Unit
fun <A, B : Any> map(iterable: Iterable<A>, mapper: CoroutineScope.(A) -> B): Collection<B>
fun <A, B : Any> map(iterable: Iterable<A>, filter: (A) -> Boolean, mapper: CoroutineScope.(A) -> B): List<B>
fun <A> poolEach(iterable: Iterable<A>, callback: CoroutineScope.(A) -> Unit): Unit
fun <A> poolEach(threads: Int, name: String, iterable: Iterable<A>, callback: CoroutineScope.(A) -> Unit): Unit
fun <A, B : Any> poolMap(iterable: Iterable<A>, mapper: CoroutineScope.(A) -> B): List<B>
fun <A, B : Any> poolMap(threads: Int, name: String, iterable: Iterable<A>, mapper: CoroutineScope.(A) -> B): List<B>
val poolName: String
val poolThreads: Int
fun <A> with(iterable: Iterable<A>, callback: A.() -> Unit): Unit
class PathFileTransfer : AbstractFileTransfer
object Patterns
class PreemptiveAuthInterceptor : HttpRequestInterceptor
class ProgressCountdown
class ProgressIndicator
open class ProgressLogger
open class PropertyException : CommonException
class PropertyParser
Module Contents
PropertyParser(project: Project)
fun boolean(name: String): Boolean?
const val EMPTY_LIST: String
const val EMPTY_MAP: String
val envProps: MutableMap<String!, String!>!
fun expand(file: File, props: Map<String, Any?>): Unit
fun expand(source: String, props: Map<String, Any?>, context: String? = null): String
fun file(name: String, projectRelative: Project): File?
fun file(name: String, projectRootFallback: Boolean = true): File?
fun flag(vararg names: String): Boolean
fun flag(name: String): Boolean
val force: Boolean
const val FORCE_PROP: String
fun int(name: String): Int?
fun list(name: String, delimiter: String = ","): List<String>?
fun long(name: String): Long?
fun map(name: String, valueDelimiter: String = ",", keyDelimiter: String = "="): Map<String, String>?
fun string(name: String): String?
val systemProps: Map<String, String>
abstract class ProtocolFileTransfer : AbstractFileTransfer
class RequestException : HttpException
open class Resetup : RuntimeDefaultTask
open class Resolve : RuntimeDefaultTask
class ResolveFileException : FileException
class ResolveFileTransfer : ProtocolFileTransfer
abstract class Resolver<G : FileGroup>
Module Contents
Resolver(common: CommonExtension)
val common: CommonExtension
fun config(configurer: G.() -> Unit): Unit
abstract fun createGroup(name: String): G
fun download(urlDir: String, vararg fileNames: String): List<FileResolution>
fun download(urlDir: String, fileNames: Iterable<String>): List<FileResolution>
fun download(url: String): FileResolution
const val DOWNLOAD_DIR_DEFAULT: String
val downloadDir: DirectoryProperty!
fun downloadHttp(url: String, options: HttpFileTransfer.() -> Unit): FileResolution
fun downloadSftp(url: String, options: SftpFileTransfer.() -> Unit): FileResolution
fun downloadSmb(url: String, options: SmbFileTransfer.() -> Unit): FileResolution
val files: List<File>
fun get(value: Any): FileResolution
fun getAll(vararg values: Any): Unit
fun getAll(values: Iterable<Any>): Unit
fun group(name: String): G
@Synchronized fun group(name: String, configurer: Resolver<G>.() -> Unit): Unit
fun group(name: String, downloadUrl: String): Unit
const val GROUP_DEFAULT: String
fun groupFiles(name: String): List<File>
val groups: List<G>
operator fun String.invoke(groupDefiner: Resolver<G>.() -> Unit): Unit
operator fun String.invoke(vararg values: Any, groupOptions: G.() -> Unit = {}): Unit
operator fun String.invoke(values: Iterable<Any>, groupOptions: G.() -> Unit = {}): Unit
val localFilePatterns: ListProperty<String!>!
val parallelLevel: Property<Int!>!
fun resolve(dependencyNotation: Any): FileResolution
fun resolveGroups(groupName: String): List<G>
fun useLocal(path: String): FileResolution
fun useLocal(sourceFile: File): FileResolution
fun useLocalBy(dir: Any, filePatterns: Iterable<String>, selector: Iterable<File>.() -> File?): FileResolution?
fun useLocalBy(dir: Any, selector: Iterable<File>.() -> File?): FileResolution?
fun useLocalLastModified(dir: Any): FileResolution?
fun useLocalLastNamed(dir: Any): FileResolution?
fun useLocalRecent(dir: Any): FileResolution?
class ResponseException : HttpException
open class Restart : RuntimeDefaultTask
class Retry
open class RuntimeDefaultTask : CommonDefaultTask
class RuntimePlugin : CommonDefaultPlugin
open class ServiceAccessor
open class Setup : RuntimeDefaultTask
class SftpFileException : FileException
class SftpFileTransfer : ProtocolFileTransfer
class SmbFileException : FileException
class SmbFileTransfer : ProtocolFileTransfer
class TaskFacade : Serializable
class TaskSequence
open class Up : RuntimeDefaultTask
class UrlFileTransfer : ProtocolFileTransfer
object Utils
open class ZipTask : Zip, CommonTask
package com.cognifide.gradle.common
package com.cognifide.gradle.common.build
Module Contents
object Behaviors
class BuildScope
class CollectingLogger
class DependencyFile
class ObjectFactory
object Parallel
Module Contents
fun <A> each(iterable: Iterable<A>, callback: CoroutineScope.(A) -> Unit): Unit
fun <A, B : Any> map(iterable: Iterable<A>, mapper: CoroutineScope.(A) -> B): Collection<B>
fun <A, B : Any> map(iterable: Iterable<A>, filter: (A) -> Boolean, mapper: CoroutineScope.(A) -> B): List<B>
fun <A> poolEach(iterable: Iterable<A>, callback: CoroutineScope.(A) -> Unit): Unit
fun <A> poolEach(threads: Int, name: String, iterable: Iterable<A>, callback: CoroutineScope.(A) -> Unit): Unit
fun <A, B : Any> poolMap(iterable: Iterable<A>, mapper: CoroutineScope.(A) -> B): List<B>
fun <A, B : Any> poolMap(threads: Int, name: String, iterable: Iterable<A>, mapper: CoroutineScope.(A) -> B): List<B>
val poolName: String
val poolThreads: Int
fun <A> with(iterable: Iterable<A>, callback: A.() -> Unit): Unit
class ProgressCountdown
class ProgressIndicator
open class ProgressLogger
open class PropertyException : CommonException
class PropertyParser
Module Contents
PropertyParser(project: Project)
fun boolean(name: String): Boolean?
const val EMPTY_LIST: String
const val EMPTY_MAP: String
val envProps: MutableMap<String!, String!>!
fun expand(file: File, props: Map<String, Any?>): Unit
fun expand(source: String, props: Map<String, Any?>, context: String? = null): String
fun file(name: String, projectRelative: Project): File?
fun file(name: String, projectRootFallback: Boolean = true): File?
fun flag(vararg names: String): Boolean
fun flag(name: String): Boolean
val force: Boolean
const val FORCE_PROP: String
fun int(name: String): Int?
fun list(name: String, delimiter: String = ","): List<String>?
fun long(name: String): Long?
fun map(name: String, valueDelimiter: String = ",", keyDelimiter: String = "="): Map<String, String>?
fun string(name: String): String?
val systemProps: Map<String, String>
class Retry
open class ServiceAccessor
package com.cognifide.gradle.common.file
package com.cognifide.gradle.common.file.resolver
Module Contents
open class FileGroup
open class FileResolution
Module Contents
FileResolution(group: FileGroup, id: String, resolver: (FileResolution) -> File)
fun archiveFile(archive: File, entryPattern: String): File
fun archiveFiles(archive: File, entriesPattern: String): Sequence<File>
fun archiveTree(archive: File): FileTree
fun copyArchiveFile(archive: File, entryPattern: String, target: File): File
fun copyArchiveFiles(archive: File, entriesPattern: String, targetDir: File): Unit
fun copyFile(source: File, target: File): Unit
fun copyToDirectory(source: File, targetDir: File): Unit
val dir: File
val file: File
val group: FileGroup
val id: String
fun resolve(): File
fun then(operation: FileResolution.(File) -> File): Unit
fun use(operation: FileResolution.(File) -> Unit): Unit
open class FileResolver : Resolver<FileGroup>
abstract class Resolver<G : FileGroup>
Module Contents
Resolver(common: CommonExtension)
val common: CommonExtension
fun config(configurer: G.() -> Unit): Unit
abstract fun createGroup(name: String): G
fun download(urlDir: String, vararg fileNames: String): List<FileResolution>
fun download(urlDir: String, fileNames: Iterable<String>): List<FileResolution>
fun download(url: String): FileResolution
const val DOWNLOAD_DIR_DEFAULT: String
val downloadDir: DirectoryProperty!
fun downloadHttp(url: String, options: HttpFileTransfer.() -> Unit): FileResolution
fun downloadSftp(url: String, options: SftpFileTransfer.() -> Unit): FileResolution
fun downloadSmb(url: String, options: SmbFileTransfer.() -> Unit): FileResolution
val files: List<File>
fun get(value: Any): FileResolution
fun getAll(vararg values: Any): Unit
fun getAll(values: Iterable<Any>): Unit
fun group(name: String): G
@Synchronized fun group(name: String, configurer: Resolver<G>.() -> Unit): Unit
fun group(name: String, downloadUrl: String): Unit
const val GROUP_DEFAULT: String
fun groupFiles(name: String): List<File>
val groups: List<G>
operator fun String.invoke(groupDefiner: Resolver<G>.() -> Unit): Unit
operator fun String.invoke(vararg values: Any, groupOptions: G.() -> Unit = {}): Unit
operator fun String.invoke(values: Iterable<Any>, groupOptions: G.() -> Unit = {}): Unit
val localFilePatterns: ListProperty<String!>!
val parallelLevel: Property<Int!>!
fun resolve(dependencyNotation: Any): FileResolution
fun resolveGroups(groupName: String): List<G>
fun useLocal(path: String): FileResolution
fun useLocal(sourceFile: File): FileResolution
fun useLocalBy(dir: Any, filePatterns: Iterable<String>, selector: Iterable<File>.() -> File?): FileResolution?
fun useLocalBy(dir: Any, selector: Iterable<File>.() -> File?): FileResolution?
fun useLocalLastModified(dir: Any): FileResolution?
fun useLocalLastNamed(dir: Any): FileResolution?
fun useLocalRecent(dir: Any): FileResolution?
package com.cognifide.gradle.common.file.transfer
Module Contents
abstract class AbstractFileTransfer : FileTransferHandler, Serializable
class FileDownloader
data class FileEntry
interface FileTransfer
Module Contents
open fun delete(fileUrl: String): Unit
abstract fun deleteFrom(dirUrl: String, fileName: String): Unit
open fun download(fileUrl: String, target: File): Unit
abstract fun download(fileUrl: String): File
abstract fun downloadFrom(dirUrl: String, fileName: String, target: File): Unit
open fun downloadTo(fileUrl: String, dir: File): File
open fun exists(fileUrl: String): Boolean
open fun exists(dirUrl: String, fileName: String): Boolean
abstract fun handles(fileUrl: String): Boolean
abstract fun list(dirUrl: String): List<FileEntry>
fun splitFileUrl(fileUrl: String): Pair<String, String>
abstract fun stat(dirUrl: String, fileName: String): FileEntry?
open fun stat(fileUrl: String): FileEntry?
abstract fun truncate(dirUrl: String): Unit
open fun upload(fileUrl: String, source: File): Unit
abstract fun uploadTo(dirUrl: String, fileName: String, source: File): Unit
open fun uploadTo(dirUrl: String, source: File): Unit
open class FileTransferException : CommonException
class FileTransferFactory
interface FileTransferHandler : FileTransfer
class FileTransferManager : FileTransfer
Module Contents
FileTransferManager(common: CommonExtension)
val credentials: Pair<String, String>
fun credentials(user: String?, password: String?, domain: String? = null): Unit
val credentialsString: String
fun custom(name: String, definition: CustomFileTransfer.() -> Unit): Unit
fun deleteFrom(dirUrl: String, fileName: String): Unit
val domain: Property<String!>!
fun download(fileUrl: String): File
fun downloadFrom(dirUrl: String, fileName: String, target: File): Unit
fun downloadUsing(transfer: FileTransfer, fileUrl: String, target: File): Unit
fun downloadUsing(transfer: FileTransfer, dirUrl: String, fileName: String, target: File): Unit
val factory: FileTransferFactory
fun handles(fileUrl: String): Boolean
fun handling(fileUrl: String): FileTransferHandler
val http: HttpFileTransfer
fun http(options: HttpFileTransfer.() -> Unit): Unit
fun list(dirUrl: String): List<FileEntry>
const val NAME: String
fun named(name: String): FileTransfer
val password: Property<String!>!
val path: PathFileTransfer
fun path(options: PathFileTransfer.() -> Unit): Unit
val resolve: ResolveFileTransfer
fun resolve(options: ResolveFileTransfer.() -> Unit): Unit
val sftp: SftpFileTransfer
fun sftp(options: SftpFileTransfer.() -> Unit): Unit
val smb: SmbFileTransfer
fun smb(options: SmbFileTransfer.() -> Unit): Unit
fun stat(dirUrl: String, fileName: String): FileEntry?
const val TMP_SUFFIX: String
fun truncate(dirUrl: String): Unit
fun uploadTo(dirUrl: String, fileName: String, source: File): Unit
fun uploadUsing(transfer: FileTransfer, fileUrl: String, source: File): Unit
fun uploadUsing(transfer: FileTransfer, dirUrl: String, fileName: String, source: File): Unit
val url: UrlFileTransfer
fun url(options: UrlFileTransfer.() -> Unit): Unit
val user: Property<String!>!
class FileUploader
abstract class ProtocolFileTransfer : AbstractFileTransfer
package com.cognifide.gradle.common.file.transfer.generic
Module Contents
class CustomFileTransfer : ProtocolFileTransfer
Module Contents
CustomFileTransfer(common: CommonExtension)
fun delete(callback: (dirUrl: String, fileName: String) -> Unit): Unit
fun deleteFrom(dirUrl: String, fileName: String): Unit
fun download(callback: (dirUrl: String, fileName: String, target: File) -> Unit): Unit
fun downloadFrom(dirUrl: String, fileName: String, target: File): Unit
fun exists(callback: (dirUrl: String, fileName: String) -> Boolean): Unit
fun exists(dirUrl: String, fileName: String): Boolean
fun list(callback: (dirUrl: String) -> List<FileEntry>): Unit
fun list(dirUrl: String): List<FileEntry>
lateinit var name: String
val parallelable: Provider<Boolean!>!
lateinit var protocols: List<String>
fun truncate(callback: (dirUrl: String) -> Unit): Unit
fun truncate(dirUrl: String): Unit
fun upload(callback: (dirUrl: String, fileName: String, target: File) -> Unit): Unit
fun uploadTo(dirUrl: String, fileName: String, source: File): Unit
class PathFileTransfer : AbstractFileTransfer
class UrlFileTransfer : ProtocolFileTransfer
package com.cognifide.gradle.common.file.transfer.http
package com.cognifide.gradle.common.file.transfer.resolve
package com.cognifide.gradle.common.file.transfer.sftp
package com.cognifide.gradle.common.file.transfer.smb
package com.cognifide.gradle.common.file.watcher
package com.cognifide.gradle.common.http
Module Contents
open class HttpClient
Module Contents
HttpClient(common: CommonExtension)
fun asHtml(response: HttpResponse): Document
fun asHtml(htmlString: String): Document
fun asJson(response: HttpResponse): DocumentContext
fun asJson(jsonString: String): DocumentContext
fun <reified T : Any> asObjectFromJson(response: HttpResponse): T
fun <T> asObjectFromJson(response: HttpResponse, clazz: Class<T>): T
fun asStream(response: HttpResponse): InputStream
fun asString(response: HttpResponse): String
fun asXml(response: HttpResponse): Document
fun asXml(xmlString: String): Document
val authorizationPreemptive: Property<Boolean!>!
val baseUrl: Property<String!>!
open fun baseUrl(uri: String): String
var basicCredentials: Pair<String?, String?>
val basicPassword: Property<String!>!
val basicUser: Property<String!>!
fun checkHtml(response: HttpResponse, validator: Document.() -> Boolean): Unit
fun checkStatus(response: HttpResponse, statusCodes: IntRange = STATUS_CODE_VALID): Unit
fun checkStatus(response: HttpResponse, statusCode: Int): Unit
fun checkStatus(response: HttpResponse, statusCodes: List<Int>): Unit
fun checkText(response: HttpResponse, containedText: String, ignoreCase: Boolean = true): Unit
val client: CloseableHttpClient!
fun clientBuilder(builder: HttpClientBuilder.() -> Unit): Unit
val connectionIgnoreSsl: Property<Boolean!>!
val connectionRetries: Property<Boolean!>!
val connectionTimeout: Property<Int!>!
open fun createEntityMultipart(params: Map<String, Any?>): HttpEntity
open fun createEntityUrlencoded(params: Map<String, Any?>): HttpEntity
fun delete(uri: String): Unit
fun <T> delete(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> delete(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpDelete.() -> Unit): T
fun download(fileUrl: String): File
fun download(fileUrl: String, target: File): Unit
fun downloadTo(fileUrl: String, dir: File): File
open fun <T> execute(method: HttpRequestBase, handler: HttpClient.(HttpResponse) -> T): T
fun execute(method: HttpRequestBase): Unit
fun get(uri: String): Unit
fun <T> get(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> get(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpGet.() -> Unit): T
fun head(uri: String): Unit
fun <T> head(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> head(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpHead.() -> Unit): T
val multipartBinaryType: Property<ContentType!>!
val multipartTextType: Property<ContentType!>!
fun patch(path: String): Unit
fun <T> patch(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> patch(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpPatch.() -> Unit): T
fun post(url: String, params: Map<String, Any?> = mapOf()): Unit
fun <T> post(uri: String, params: Map<String, Any?> = mapOf(), handler: HttpClient.(HttpResponse) -> T): T
fun <T> post(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> post(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpPost.() -> Unit): T
fun postMultipart(uri: String, params: Map<String, Any?> = mapOf()): Unit
fun <T> postMultipart(uri: String, params: Map<String, Any?> = mapOf(), handler: HttpClient.(HttpResponse) -> T): T
fun postUrlencoded(uri: String, params: Map<String, Any?> = mapOf()): Unit
fun <T> postUrlencoded(uri: String, params: Map<String, Any?> = mapOf(), handler: HttpClient.(HttpResponse) -> T): T
val proxyHost: Property<String!>!
val proxyPort: Property<Int!>!
val proxyScheme: Property<String!>!
fun put(uri: String): Unit
fun <T> put(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> put(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpPut.() -> Unit): T
fun <T> request(method: String, uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun requestConfigurer(configurer: HttpRequestBase.() -> Unit): Unit
fun responseChecker(checker: (HttpResponse) -> Unit): Unit
val responseChecks: Property<Boolean!>!
fun responseHandler(handler: (HttpResponse) -> Unit): Unit
val STATUS_CODE_VALID: IntRange
open fun throwStatusException(response: HttpResponse): Unit
fun HttpClientBuilder.useDefaults(): Unit
open class HttpException : CommonException
class PreemptiveAuthInterceptor : HttpRequestInterceptor
class RequestException : HttpException
class ResponseException : HttpException
package com.cognifide.gradle.common.notifier
Module Contents
class DorkboxNotifier : Notifier
interface Notifier
class NotifierFacade
Module Contents
val common: CommonExtension
fun config(config: NotifierFacade.() -> Notifier): Unit
fun custom(notifier: (title: String, text: String, level: LogLevel, onClick: (Notify) -> Unit) -> Unit): Notifier
fun dorkbox(configurer: Notify.() -> Unit = {}): Notifier
val enabled: Property<Boolean!>!
fun error(title: String, text: String): Unit
val iconFailure: RegularFileProperty!
val iconSuccess: RegularFileProperty!
fun info(title: String, text: String): Unit
fun lifecycle(title: String, text: String): Unit
fun log(title: String): Unit
fun log(title: String, message: String): Unit
fun log(title: String, message: String, level: LogLevel): Unit
fun notify(title: String): Unit
fun notify(title: String, text: String, level: LogLevel, onClick: (Notify) -> Unit = {}): Unit
fun notify(title: String, text: String): Unit
fun of(common: CommonExtension): NotifierFacade
fun warn(title: String, text: String): Unit
package com.cognifide.gradle.common.tasks
package com.cognifide.gradle.common.tasks.runtime
package com.cognifide.gradle.common.utils
Module Contents
object Formats
Module Contents
fun asHtml(value: String): Document!
fun asHtml(input: InputStream): Document!
fun asJson(input: InputStream): DocumentContext!
fun asJson(value: String): DocumentContext!
fun asVersion(value: String, partsTaken: Int = 3): GradleVersion
fun asXml(value: String): Document!
fun asXml(input: InputStream): Document!
fun date(date: Date = Date()): String
fun dateAt(timestamp: Long, zoneId: ZoneId): Date
fun dateFileName(date: Date = Date()): String
fun duration(millis: Long): String
fun durationFit(thenMillis: Long, thenZoneId: ZoneId, durationMillis: Long): Boolean
fun durationSince(millis: Long): String
fun fileSize(file: File): String
fun fileSizeBytesToHuman(bytes: Long): String
fun <reified T : Any> fromJson(json: String): T
fun <T> fromJson(input: InputStream, clazz: Class<T>): T
fun <T> fromJson(json: String, clazz: Class<T>): T
fun fromJsonToMap(json: String): Map<String, Any?>
fun localDateTimeAt(timestamp: Long, zoneId: ZoneId): LocalDateTime
fun normalizePath(path: String): String
fun percent(current: Int, total: Int): String
fun percent(current: Long, total: Long): String
fun percentExplained(current: Int, total: Int): String
fun percentExplained(current: Long, total: Long): String
fun projectPath(file: File, project: Project): String
fun projectPath(path: String, project: Project): String
fun relativePath(path: String, basePath: String): String
fun rootProjectPath(file: File, project: Project): String
fun rootProjectPath(path: String, project: Project): String
fun toBase64(value: String): String
fun toJson(value: Any, pretty: Boolean = true): String
fun toJson(value: Map<String, Any?>, pretty: Boolean = true): String
fun toList(value: String?, delimiter: String = ","): List<String>?
fun toMap(value: String?, valueDelimiter: String = ",", keyDelimiter: String = "="): Map<String, String>?
fun toMd5(text: String): String
fun toPassword(value: String): String
fun versionAtLeast(actual: String, required: String): Boolean
fun versionUnknown(): GradleVersion!
kotlin.collections.Iterable
object Patterns
fun <T> T.using(block: T.() -> Unit): Unit
object Utils
package com.cognifide.gradle.common.utils.formats