sbt

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachSBTPositions

func AttachSBTPositions(g *sdk.Graph, projectDir string)

AttachSBTPositions wires build.sbt / Dependencies.scala line numbers into an SBT-resolved graph.

Types

type Detector

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

Detector resolves Scala sbt dependency declarations from committed build files.

func (Detector) Applicable

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

Applicable reports whether sbt build files are present.

func (Detector) Descriptor

func (d Detector) Descriptor() sdk.DetectorDescriptor

Descriptor describes the sbt detector.

func (Detector) FallbackDetector

func (d Detector) FallbackDetector() sdk.Detector

FallbackDetector returns the configured fallback detector.

func (Detector) PackageManagerSupport

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

PackageManagerSupport returns sbt package-manager discovery metadata.

func (Detector) Ready

func (d Detector) Ready() bool

Ready reports whether committed sbt files can be parsed.

func (Detector) ResolveGraph

ResolveGraph resolves an sbt dependency graph.

type NativeDetector

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

NativeDetector resolves Scala sbt dependency graphs by running `sbt --no-colors --batch dependencyTree`. This produces a proper transitive tree with parent-child edges, unlike the manifest-only Detector.

func (NativeDetector) Applicable

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

Applicable reports whether sbt build files are present.

func (NativeDetector) Descriptor

func (d NativeDetector) Descriptor() sdk.DetectorDescriptor

Descriptor describes the sbt native detector.

func (NativeDetector) FallbackDetector

func (d NativeDetector) FallbackDetector() sdk.Detector

FallbackDetector returns the configured fallback detector.

func (NativeDetector) PackageManagerSupport

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

PackageManagerSupport returns sbt package-manager discovery metadata.

func (NativeDetector) Ready

func (d NativeDetector) Ready() bool

Ready reports whether the sbt binary is available.

func (NativeDetector) ResolveGraph

ResolveGraph resolves an sbt dependency graph via sbt dependencyTree.

Jump to

Keyboard shortcuts

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