Class Pub
-
- All Implemented Interfaces:
-
org.ossreviewtoolkit.utils.common.CommandLineTool
public final class Pub extends PackageManager implements CommandLineToolThe Pub package manager for Dart / Flutter.
This implementation is using the Pub version that is distributed with Flutter. If Flutter is not installed on the system it is automatically downloaded and installed in the
~/.ort/toolsdirectory. The version of Flutter that is automatically installed can be configured by setting theFLUTTER_VERSIONenvironment variable.This package manager supports the following options:
gradleVersion: The version of Gradle to use when analyzing Gradle projects. Defaults to GRADLE_VERSION.
pubDependenciesOnly: Only scan Pub dependencies and skip native ones for Android (Gradle) and iOS (CocoaPods).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classPub.Factorypublic classPub.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static StringOPTION_PUB_DEPENDENCIES_ONLYprivate final FileanalysisRootprivate final AnalyzerConfigurationanalyzerConfigprivate final Excludesexcludesprivate final StringmanagerNameprivate final RepositoryConfigurationrepoConfigpublic final static Pub.CompanionCompanion
-
Method Summary
Modifier and Type Method Description StringtransformVersion(String output)RangesListgetVersionRequirement()PackageManagerDependencyResultfindPackageManagerDependencies(Map<PackageManager, List<File>> managedFiles)List<ProjectAnalyzerResult>resolveDependencies(File definitionFile, Map<String, String> labels)StringgetVersion(File workingDir)Stringcommand(File workingDir)ProcessCapturerun(File workingDir, CharSequence args)-
Methods inherited from class org.ossreviewtoolkit.analyzer.PackageManager
getAnalysisRoot, getAnalyzerConfig, getExcludes, getManagerName, getRepoConfig, mapDefinitionFiles, resolveDependencies -
Methods inherited from class org.ossreviewtoolkit.utils.common.CommandLineTool
checkVersion, getVersionArguments, isInPath, run -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
transformVersion
String transformVersion(String output)
-
getVersionRequirement
RangesList getVersionRequirement()
-
findPackageManagerDependencies
PackageManagerDependencyResult findPackageManagerDependencies(Map<PackageManager, List<File>> managedFiles)
-
resolveDependencies
List<ProjectAnalyzerResult> resolveDependencies(File definitionFile, Map<String, String> labels)
-
getVersion
String getVersion(File workingDir)
-
run
ProcessCapture run(File workingDir, CharSequence args)
-
-
-
-