gradle

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachGradlePositions

func AttachGradlePositions(g *sdk.Graph, projectDir, relDir string)

AttachGradlePositions wires gradle build/lock file line numbers into a gradle-resolved graph. Build files are read from projectDir; relDir is the scan-root-relative subproject directory (slash form, empty for the root project) used to keep recorded file paths repo-relative.

Types

type Detector

type Detector struct {
	Logger     *zap.Logger
	WorkingDir string
	Fallback   sdk.Detector
}

Detector resolves Gradle dependency graphs using the Gradle wrapper when present, or a globally installed Gradle binary otherwise.

func (Detector) Applicable

func (d Detector) Applicable(ctx context.Context, req sdk.DetectionRequest) (bool, error)

Applicable returns true when the project looks like a Gradle build.

func (Detector) Descriptor

func (d Detector) Descriptor() sdk.DetectorDescriptor

Descriptor describes the Gradle graph detector.

func (Detector) FallbackDetector

func (d Detector) FallbackDetector() sdk.Detector

FallbackDetector returns the configured fallback detector.

func (Detector) Install

func (d Detector) Install(ctx context.Context, req sdk.DetectionRequest) error

Install prepares Gradle dependencies before graph resolution.

func (Detector) PackageManagerSupport

func (d Detector) PackageManagerSupport() []sdk.PackageManagerSupport

PackageManagerSupport returns Gradle package-manager discovery metadata.

func (Detector) Ready

func (d Detector) Ready(ctx context.Context, req sdk.DetectionRequest) error

Ready returns nil when a Gradle wrapper is present for the request's working directory (or gradle is on PATH) and a usable Java runtime is available.

func (Detector) ResolveGraph

func (d Detector) ResolveGraph(ctx context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)

ResolveGraph resolves a Gradle dependency graph for the scan engine. For a multi-project build (settings script with includes), each subproject seen in the dependency report becomes its own manifest entry, mirroring the maven reactor split; single-project builds keep one entry.

Jump to

Keyboard shortcuts

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