ConfigParser class

A parser for YAML configuration files used in the distribution process.

The ConfigParser class is responsible for parsing YAML configuration files, converting them into structured objects, and providing access to tasks, environments, and arguments defined in the configuration. It handles variable substitution and validates required configuration fields.

Constructors

ConfigParser({required List<Task> tasks, required Map<String, dynamic>? arguments, required Map<String, dynamic> environments, required ArgResults? globalResults, required Variables variables, List<NotificationConfig> notifications = const [], Map<String, dynamic> ai = const {}, Map<String, dynamic> changelog = const {}, ParallelSettings parallelSettings = const ParallelSettings(), ErrorPolicy errorPolicy = ErrorPolicy.continueRun, HookSet hooks = const HookSet(), VersionConfig? versionConfig, CleanConfig? clean, String output = "distribution"})
Creates a new ConfigParser instance.

Properties

ai Map<String, dynamic>
Raw ai: mapping, or an empty map when the section is absent.
final
arguments Map<String, dynamic>?
The raw arguments: mapping, when the configuration declares one.
final
changelog Map<String, dynamic>
Raw changelog: mapping, or an empty map when the section is absent.
final
clean CleanConfig?
Optional automatic cleanup.
final
environments Map<String, dynamic>
The environment variables used in the configuration
getter/setter pair
errorPolicy ErrorPolicy
Global reaction to fatal task failures.
final
globalResults → ArgResults?
Global command line argument results from the CLI parser
final
hashCode int
The hash code for this object.
no setterinherited
hooks HookSet
Custom commands surrounding the complete run.
final
notifications List<NotificationConfig>
Notifications delivered once the whole run has finished.
final
output String
The output directory for distribution files
final
parallel int
Backwards-compatible view of the configured worker count.
no setter
parallelSettings ParallelSettings
How many tasks may run at once, or null when the file does not say.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tasks List<Task>
The list of tasks defined in the configuration
getter/setter pair
variables Variables
Variable resolver bound to environments, reused by consumers that need to expand placeholders after parsing (notifications, validation).
final
versionConfig VersionConfig?
Optional automatic version resolution.
final

Methods

builderOutputDirectories() Set<String>
Output directories used by builder jobs, including platform defaults.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
protectedCredentialFiles() Set<String>
Credential files that cleanup must never remove, including custom paths.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

distributeYaml(String path, ArgResults? globalResults) Future<ConfigParser>
Creates a ConfigParser instance by parsing a YAML file.
pathJoin(String first, String second, String third) String
readRawYaml(File file) Map<String, dynamic>
Reads a YAML file as a mutable JSON-compatible map.