Class Pub

  • All Implemented Interfaces:
    org.ossreviewtoolkit.utils.common.CommandLineTool

    
    public final class Pub
    extends PackageManager implements CommandLineTool
                        

    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.

    This package manager supports the following options:

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

    • gradleVersion: The version of Gradle to use when analyzing Gradle projects. Defaults to DEFAULT_GRADLE_VERSION.

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