PullUpDependenciesTask class tasks
This task scans the lockfile to check if dependencies should be pulled up.
Pulling up means, that the pubspec.yaml
and pubspec.lock
are scanned to
check if any dependencies in the lockfile have a higher version then
specified in the pubspec.yaml
. If that is the case, the task will print
out the dependencies as well as the version it should be pulled up to and
exit with TaskResult.rejected.
The task only checks for normal versions and ignores prereleases etc. However, it does include nullsafe versions.
If the lockfile is checked in, this task only runs whenever the lockfile has actually been staged. If it is ignored, the task instead runs on every commit to find dependencies.
Example:
# pubspec.yaml
dependencies:
dep_a: ^1.0.0
dep_b: ^2.0.0
# pubspec.lock
dep_a:
version: 1.0.0
dep_b:
version: 1.1.0
In this example, the task would report dep_b
, as the actually used version
in the lockfile is higher then the minimal allowed version in the project.
Constructors
- PullUpDependenciesTask({required ProgramRunner programRunner, required FileResolver fileResolver, required TaskLogger logger})
-
Default Constructor.
const
Properties
- callForEmptyEntries → bool
-
Specifies, whether the task should still be executed, even if no files
match.
no setteroverride
- filePattern → Pattern
-
Returns a pattern to check if a RepoEntry can be processed by this task.
no setteroverride
- fileResolver → FileResolver
-
The FileResolver instance used by this task.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger → TaskLogger
-
The TaskLogger instance used by this task.
final
- programRunner → ProgramRunner
-
The ProgramRunner instance used by this task.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- taskName → String
-
Returns the user-visible name of the task.
no setteroverride
Methods
-
call(
Iterable< RepoEntry> entries) → Future<TaskResult> -
Executes the task on all given
entries
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited