Documentation ¶
Index ¶
- func Cmd(command string, taskArgs ...string) (string, error)
- func Dependencies(project string, i Input) (map[string]graph.Deps, error)
- func MergeProjectsDependencies(i Input, projects []string) (map[string]graph.Deps, error)
- func NormalizeDependencies(imports []Dependency, deps map[Dependency][]Dependency) graph.Deps
- func ValidBinary(dir string) (string, error)
- type Dependency
- type Input
- type LineParser
- type ShellCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dependencies ¶ added in v0.7.24
Dependencies returns the dependencies of a gradle project
func MergeProjectsDependencies ¶ added in v0.7.24
MergeProjectsDependencies creates a complete configuration to dep graph map by looping through a given list of projects and merging their dependencies by configuration.
func NormalizeDependencies ¶ added in v0.7.17
func NormalizeDependencies(imports []Dependency, deps map[Dependency][]Dependency) graph.Deps
NormalizeDependencies turns a dependency map into a FOSSA recognized dependency graph.
func ValidBinary ¶ added in v0.7.24
ValidBinary finds the best possible gradle command to run for shell commands.
Types ¶
type Dependency ¶
Dependency models a gradle dependency.
func ParseDependencies ¶
func ParseDependencies(stdout string) ([]Dependency, map[Dependency][]Dependency, error)
func ReadDependencyTree ¶
func ReadDependencyTree(lines []string, parser LineParser) ([]Dependency, map[Dependency][]Dependency, error)
type Input ¶ added in v0.7.24
type Input interface { ProjectDependencies(...string) (map[string]graph.Deps, error) DependencyTasks() ([]string, error) }
Input is an interface for any point where gradle analysis requires input from a file, shell command, or other source.
func NewShellInput ¶ added in v0.7.24
NewShellInput creates a new ShellCommand and returns it as an Input.
type LineParser ¶
type LineParser func(line string) (level int, node Dependency, err error)
level is 1-indexed
type ShellCommand ¶ added in v0.7.24
type ShellCommand struct { Binary string Dir string Online bool Cmd func(string, ...string) (string, error) }
ShellCommand controls the information needed to run a gradle command.
func (ShellCommand) DependencyTasks ¶ added in v0.7.24
func (s ShellCommand) DependencyTasks() ([]string, error)
DependencyTasks returns a list of gradle projects by analyzing a list of gradle tasks.
func (ShellCommand) ProjectDependencies ¶ added in v0.7.24
ProjectDependencies returns the dependencies of a given gradle project