gradle

package
v0.7.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2018 License: MPL-2.0 Imports: 12 Imported by: 2

Documentation

Overview

Package gradle implements analyzers for Gradle.

A `BuildTarget` in Gradle is `$PROJECT:$CONFIGURATION`, where the Gradle module would list its dependencies by running `gradle $PROJECT:dependencies --configuration=$CONFIGURATION`. The directory of the `build.gradle` file is specified by `Dir`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discover

func Discover(dir string, options map[string]interface{}) ([]module.Module, error)

Discover searches for `build.gradle` files and creates a module for each `*:dependencies` task in the output of `gradle tasks`.

TODO: use the output of `gradle projects` and try `gradle <project>:dependencies` for each project?

Types

type Analyzer

type Analyzer struct {
	GradleCmd string

	Module  module.Module
	Options Options
}

func New

func New(m module.Module) (*Analyzer, error)

func (*Analyzer) Analyze

func (a *Analyzer) Analyze() (graph.Deps, error)

func (*Analyzer) Build

func (a *Analyzer) Build() error

func (*Analyzer) Clean

func (a *Analyzer) Clean() error

func (*Analyzer) IsBuilt

func (a *Analyzer) IsBuilt() (bool, error)

type Options

type Options struct {
	Cmd    string `mapstructure:"cmd"`
	Task   string `mapstructure:"task"`
	Online bool   `mapstructure:"online"`

	// TODO: These are temporary until v2 configuration files (with proper BuildTarget) are implemented.
	Project       string `mapstructure:"project"`
	Configuration string `mapstructure:"configuration"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL