Skip to main content

Pub

Pub

The Pub package manager for Dart / Flutter.

Description

The Pub package manager for Dart / Flutter.

This implementation is using the Pub version distributed with Flutter. If Flutter is not installed on the system, it is automatically downloaded and installed in the ~/.ort/tools directory. The version of Flutter that is automatically installed can be configured either by the flutterVersion package manager option (see below) or by setting the FLUTTER_VERSION environment variable. Setting the environment variable takes precedence over the configuration option.

Configuration

Example

Use the following syntax to configure this plugin globally as part of config.yml:

ort:
analyzer:
packageManagers:
Pub:
options:
flutterVersion: "3.19.3-stable"
gradleVersion: "7.3"
pubDependenciesOnly: false

Use the following syntax to configure this plugin in a repository's .ort.yml:

analyzer:
package_managers:
Pub:
options:
flutterVersion: "3.19.3-stable"
gradleVersion: "7.3"
pubDependenciesOnly: false

If the plugin is configured in both locations, the configurations are merged, with options from .ort.yml taking precedence over those from config.yml.

Options

flutterVersion

STRING Default

The version to use when bootstrapping Flutter. If Flutter is already on the path, this option is ignored.

gradleVersion

STRING Default

The version of Gradle to use when analyzing Gradle projects.

pubDependenciesOnly

BOOLEAN Default

Only scan Pub dependencies and skip native ones for Android (Gradle) and iOS (CocoaPods).