dartle_cache library
A library exposing the mechanism used by dartle to cache resources and intelligently determine which tasks must run, and which tasks may be skipped.
This allows user code to decide, for example, when to re-run jobs which depend on certain inputs, and have known outputs, as in such cases the outputs do not need to be re-computed as long as they have not changed since last time they were built from the same inputs.
Classes
- ChangeSet
- The change Set for an incremental action.
- DartleCache
- The cache used by dartle to figure out when files change between checks, typically between two builds.
- DirectoryEntry
- A directory entry, usually used within a FileCollection.
- ExceptionAndStackTrace
- FileChange
- FileChange represents a file system entity change.
- FileCollection
- A collection of File and Directory which can be used to declare a set of inputs or outputs for a Task.
- MultiFileCollection
- A FileCollection representing the union between multiple file collections.
Enums
- ChangeKind
- Kind of FileChange.
Mixins
Constants
- cacheFormatVersion → const String
- Current version of the Dartle Cache.
Functions
-
dir(
String directory, {Set< String> fileExtensions = const {}, Set<String> exclusions = const {}, bool recurse = true, bool includeHidden = false, bool allowAbsolutePaths = false}) → FileCollection - Create a FileCollection consisting of a directory, possibly filtering which files within that directory may be included.
-
dirs(
Iterable< String> directories, {Set<String> fileExtensions = const {}, Set<String> exclusions = const {}, bool recurse = true, bool includeHidden = false, bool allowAbsolutePaths = false}) → FileCollection - Create a FileCollection consisting of multiple directories, possibly filtering which files within each directory may be included.
-
entities(
Iterable< String> files, Iterable<DirectoryEntry> directoryEntries) → FileCollection - A File collection including the given files as well as DirectoryEntry's.
-
failBuild(
{required String reason, int exitCode = 1}) → Never -
Fail the build for the given
reason
. -
file(
String path) → FileCollection - Create a FileCollection consisting of a single file.
-
files(
Iterable< String> paths) → FileCollection - Create a FileCollection consisting of multiple files.
-
ignoreExceptions(
FutureOr action()) → FutureOr< bool> -
Run the given action ignoring any Exceptions thrown by it.
Returns
true
if the action succeeded,false
otherwise.
Exceptions / Errors
- DartleException
- Indicates a fatal error during a dartle build.
- HttpCodeException
- MultipleExceptions
- A DartleException caused by multiple Exceptions, usually due to multiple asynchronous actions failing simultaneously.
- ProcessExitCodeException
- Exception thrown by execRead when the process fails by completing with a non-success exit code.