-
public class CommonExtension
-
-
Field Summary
Fields Modifier and Type Field Description private final Loggerloggerprivate final PropertyParserpropprivate final ObjectFactoryobjprivate final ServiceAccessorservicesprivate final FileTransferManagerfileTransferprivate final NotifierFacadenotifierprivate final TaskFacadetasksprivate final JavaSupportjavaSupportprivate final UserInputHandleruserInputprivate final FiletemporaryDirprivate final Parallelparallelprivate final Formatsformatsprivate final Patternspatternsprivate final BuildScopebuildScopeprivate final Projectproject
-
Constructor Summary
Constructors Constructor Description CommonExtension(Project project)
-
Method Summary
Modifier and Type Method Description final UnitfileTransfer(Function1<FileTransferManager, Unit> options)Configures file transfer facade. final Unitnotifier(Function1<NotifierFacade, Unit> configurer)final Unittasks(Function1<TaskFacade, Unit> configurer)Allows to register tasks with hooks working nicely with task configuration avoidance. final UnitjavaSupport(Function1<JavaSupport, Unit> options)final <T extends Any> LazyPublishArtifactpublicationArtifact(Provider<T> provider)Allows easily provide artifact in a lazy way (e.g via task provider). final LazyPublishArtifactpublicationArtifact(String taskPath)Allows easily provide artifact in a lazy way (e.g via task provider). final <T extends Any> Tprogress(Integer total, Function1<ProgressIndicator, T> action)Show asynchronous 0 indicator with percentage while performing some action. final <T extends Any> Tprogress(Long total, Function1<ProgressIndicator, T> action)Show asynchronous progress indicator with percentage while performing some action. final <T extends Any> Tprogress(Function1<ProgressIndicator, T> action)final <T extends Any> TprogressIndicator(Function1<ProgressIndicator, T> action)Show asynchronous progress indicator while performing some action. final <T extends Any> TprogressLogger(Function1<ProgressLogger, T> action)Show synchronous progress logger while performing some action. final UnitwaitFor(Long time)Wait some time after performing asynchronous operation. final UnitprogressCountdown(Long time)Show synchronous progress countdown / time to wait after performing asynchronous operation. final UnitprogressCountdown(Function1<ProgressCountdown, Unit> options)Show synchronous progress countdown / time to wait after performing asynchronous operation. final FiletemporaryFile(String path)Determine temporary directory for particular service (any name). final StringchecksumFile(File file, Boolean recalculate)Get or compute MD5 checksum of file interactively. final FilerecentFile(String dirPath, Iterable<String> filePatterns)Get recent file from directory final FilerecentFile(File dir, Iterable<String> filePatterns)Get recent file from directory final Provider<File>recentFileProvider(String dirPath, Iterable<String> filePatterns)Get recent file from directory final Provider<File>recentFileProvider(File dir, Iterable<String> filePatterns)Get recent file from directory final ConfigurableFileCollectionrecentFiles(Array<Out File> dirs, Iterable<String> filePatterns)Get recent files built in directories as file collection. final ConfigurableFileCollectionrecentFiles(Iterable<File> dirs, Iterable<String> filePatterns)Get recent files built in directories as file collection. final ConfigurableFileCollectionprovidedFiles(Array<Out Provider<File>> providers)Returns file collection with providers returning any value (avoids exception). final ConfigurableFileCollectionprovidedFiles(Iterable<Provider<File>> providers)Returns file collection with providers returning any value (avoids exception). final Retryretry(Function1<Retry, Unit> options)Factory method for configuration object determining how operation should be retried. final UnitwatchFiles(Function1<FileWatcher, Unit> options)React on file changes under configured directories. final FileresolveFile(Object value)Resolve single file from defined repositories or by using defined file transfers. final FileresolveFile(Function1<FileResolver, Unit> options)Resolve single file from defined repositories or by using defined file transfers. final List<File>resolveFiles(Array<Out Any> values)Resolve files from defined repositories or by using defined file transfers. final List<File>resolveFiles(Iterable<Any> values)Resolve files from defined repositories or by using defined file transfers. final List<File>resolveFiles(Function1<FileResolver, Unit> options)Resolve files from defined repositories or by using defined file transfers. final <T extends Any> Thttp(Function1<HttpClient, T> consumer)Perform any HTTP requests to external endpoints. final <T extends Any> ThttpFile(Function1<HttpFileTransfer, T> consumer)Download files using HTTP protocol using custom settings. final <T extends Any> TsftpFile(Function1<SftpFileTransfer, T> consumer)Transfer files using over SFTP protocol using custom settings. final <T extends Any> TsmbFile(Function1<SmbFileTransfer, T> consumer)Transfer files using over SMB protocol using custom settings. final ZipFilezip(File file)Utility to work with ZIP files (even big ones) final ZipFilezip(String path)Utility to work with ZIP files (even big ones) final List<HealthStatus>healthCheck(Function1<HealthChecker, Unit> options)final LoggergetLogger()final PropertyParsergetProp()Allows to read project property specified in command line and system property as a fallback. final ObjectFactorygetObj()Reduces boilerplate related to lazy configuration API final ServiceAccessorgetServices()Accessor for internal Gradle services. final FileTransferManagergetFileTransfer()Define settings for file transfer facade which allows to perform basic file operations on remote servers like uploading and downloading files. final NotifierFacadegetNotifier()Provides API for displaying interactive notification during running build tasks. final TaskFacadegetTasks()final JavaSupportgetJavaSupport()Configure Java for running AEM instance and compilation. final UserInputHandlergetUserInput()Grab user input interactively. final FilegetTemporaryDir()final ParallelgetParallel()final FormatsgetFormats()final PatternsgetPatterns()final BuildScopegetBuildScope()final ProjectgetProject()-
-
Constructor Detail
-
CommonExtension
CommonExtension(Project project)
-
-
Method Detail
-
fileTransfer
final Unit fileTransfer(Function1<FileTransferManager, Unit> options)
Configures file transfer facade.
-
notifier
final Unit notifier(Function1<NotifierFacade, Unit> configurer)
-
tasks
final Unit tasks(Function1<TaskFacade, Unit> configurer)
Allows to register tasks with hooks working nicely with task configuration avoidance.
-
javaSupport
final Unit javaSupport(Function1<JavaSupport, Unit> options)
-
publicationArtifact
final <T extends Any> LazyPublishArtifact publicationArtifact(Provider<T> provider)
Allows easily provide artifact in a lazy way (e.g via task provider).
-
publicationArtifact
final LazyPublishArtifact publicationArtifact(String taskPath)
Allows easily provide artifact in a lazy way (e.g via task provider).
-
progress
final <T extends Any> T progress(Integer total, Function1<ProgressIndicator, T> action)
Show asynchronous 0 indicator with percentage while performing some action.
-
progress
final <T extends Any> T progress(Long total, Function1<ProgressIndicator, T> action)
Show asynchronous progress indicator with percentage while performing some action.
-
progressIndicator
final <T extends Any> T progressIndicator(Function1<ProgressIndicator, T> action)
Show asynchronous progress indicator while performing some action.
-
progressLogger
final <T extends Any> T progressLogger(Function1<ProgressLogger, T> action)
Show synchronous progress logger while performing some action.
-
progressCountdown
final Unit progressCountdown(Long time)
Show synchronous progress countdown / time to wait after performing asynchronous operation.
-
progressCountdown
final Unit progressCountdown(Function1<ProgressCountdown, Unit> options)
Show synchronous progress countdown / time to wait after performing asynchronous operation.
-
temporaryFile
final File temporaryFile(String path)
Determine temporary directory for particular service (any name).
-
checksumFile
final String checksumFile(File file, Boolean recalculate)
Get or compute MD5 checksum of file interactively.
-
recentFile
final File recentFile(String dirPath, Iterable<String> filePatterns)
Get recent file from directory
-
recentFile
final File recentFile(File dir, Iterable<String> filePatterns)
Get recent file from directory
-
recentFileProvider
final Provider<File> recentFileProvider(String dirPath, Iterable<String> filePatterns)
Get recent file from directory
-
recentFileProvider
final Provider<File> recentFileProvider(File dir, Iterable<String> filePatterns)
Get recent file from directory
-
recentFiles
final ConfigurableFileCollection recentFiles(Array<Out File> dirs, Iterable<String> filePatterns)
Get recent files built in directories as file collection.
-
recentFiles
final ConfigurableFileCollection recentFiles(Iterable<File> dirs, Iterable<String> filePatterns)
Get recent files built in directories as file collection.
-
providedFiles
final ConfigurableFileCollection providedFiles(Array<Out Provider<File>> providers)
Returns file collection with providers returning any value (avoids exception).
-
providedFiles
final ConfigurableFileCollection providedFiles(Iterable<Provider<File>> providers)
Returns file collection with providers returning any value (avoids exception).
-
retry
final Retry retry(Function1<Retry, Unit> options)
Factory method for configuration object determining how operation should be retried.
-
watchFiles
final Unit watchFiles(Function1<FileWatcher, Unit> options)
React on file changes under configured directories.
-
resolveFile
final File resolveFile(Object value)
Resolve single file from defined repositories or by using defined file transfers.
-
resolveFile
final File resolveFile(Function1<FileResolver, Unit> options)
Resolve single file from defined repositories or by using defined file transfers.
-
resolveFiles
final List<File> resolveFiles(Array<Out Any> values)
Resolve files from defined repositories or by using defined file transfers.
-
resolveFiles
final List<File> resolveFiles(Iterable<Any> values)
Resolve files from defined repositories or by using defined file transfers.
-
resolveFiles
final List<File> resolveFiles(Function1<FileResolver, Unit> options)
Resolve files from defined repositories or by using defined file transfers.
-
http
final <T extends Any> T http(Function1<HttpClient, T> consumer)
Perform any HTTP requests to external endpoints.
-
httpFile
final <T extends Any> T httpFile(Function1<HttpFileTransfer, T> consumer)
Download files using HTTP protocol using custom settings.
-
sftpFile
final <T extends Any> T sftpFile(Function1<SftpFileTransfer, T> consumer)
Transfer files using over SFTP protocol using custom settings.
-
smbFile
final <T extends Any> T smbFile(Function1<SmbFileTransfer, T> consumer)
Transfer files using over SMB protocol using custom settings.
-
healthCheck
final List<HealthStatus> healthCheck(Function1<HealthChecker, Unit> options)
-
getProp
final PropertyParser getProp()
Allows to read project property specified in command line and system property as a fallback.
-
getObj
final ObjectFactory getObj()
Reduces boilerplate related to lazy configuration API
-
getServices
final ServiceAccessor getServices()
Accessor for internal Gradle services.
-
getFileTransfer
final FileTransferManager getFileTransfer()
Define settings for file transfer facade which allows to perform basic file operations on remote servers like uploading and downloading files.
-
getNotifier
final NotifierFacade getNotifier()
Provides API for displaying interactive notification during running build tasks.
-
getTasks
final TaskFacade getTasks()
-
getJavaSupport
final JavaSupport getJavaSupport()
Configure Java for running AEM instance and compilation.
-
getUserInput
final UserInputHandler getUserInput()
Grab user input interactively.
-
getTemporaryDir
final File getTemporaryDir()
-
getParallel
final Parallel getParallel()
-
getFormats
final Formats getFormats()
-
getPatterns
final Patterns getPatterns()
-
getBuildScope
final BuildScope getBuildScope()
-
getProject
final Project getProject()
-
-
-
-