gradle

package
v0.7.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: MPL-2.0 Imports: 11 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

This section is empty.

Types

type Analyzer

type Analyzer struct {
	GradleCmd string

	Options Options
}

func New

func New(opts map[string]interface{}) (*Analyzer, error)

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(m module.Module) (module.Module, error)

func (*Analyzer) Build

func (a *Analyzer) Build(m module.Module) error

func (*Analyzer) Clean

func (a *Analyzer) Clean(m module.Module) error

func (*Analyzer) Discover

func (a *Analyzer) Discover(dir string) ([]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?

func (*Analyzer) IsBuilt

func (a *Analyzer) IsBuilt(m module.Module) (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