gradleconfig

package
v0.16.10 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrFmtGradlePropertiesCheck = "check if gradle.properties exists at %s, error: %w"
	ErrFmtGradlePropertyWrite   = "write gradle.properties to %s, error: %w"
)
View Source
const (
	ErrFmtReadAutConfig = "read auth config from environment variables: %w"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivateForGradleParams added in v0.16.10

type ActivateForGradleParams struct {
	Cache      CacheParams
	Analytics  AnalyticsParams
	TestDistro TestDistroParams
}

func DefaultActivateForGradleParams added in v0.16.10

func DefaultActivateForGradleParams() ActivateForGradleParams

func (ActivateForGradleParams) TemplateInventory added in v0.16.10

func (params ActivateForGradleParams) TemplateInventory(
	logger log.Logger,
	envProvider func(string) string,
	isDebug bool,
) (TemplateInventory, error)

type AnalyticsParams added in v0.16.10

type AnalyticsParams struct {
	Enabled        bool
	JustDependency bool
}

type AnalyticsTemplateInventory added in v0.16.10

type AnalyticsTemplateInventory struct {
	Usage        UsageLevel
	Version      string
	Endpoint     string
	Port         int
	HTTPEndpoint string
}

type CacheParams added in v0.16.10

type CacheParams struct {
	Enabled         bool
	JustDependency  bool
	PushEnabled     bool
	ValidationLevel string
	Endpoint        string
}

type CacheTemplateInventory added in v0.16.10

type CacheTemplateInventory struct {
	Usage               UsageLevel
	Version             string
	EndpointURLWithPort string
	IsPushEnabled       bool
	ValidationLevel     string
}

type CacheValidationLevel added in v0.14.4

type CacheValidationLevel string
var (
	CacheValidationLevelNone    CacheValidationLevel = "none"
	CacheValidationLevelWarning CacheValidationLevel = "warning"
	CacheValidationLevelError   CacheValidationLevel = "error"
)

type GradlePropertiesUpdater added in v0.16.10

type GradlePropertiesUpdater struct {
	OsProxy OsProxy
}

func DefaultGradlePropertiesUpdater added in v0.16.10

func DefaultGradlePropertiesUpdater() GradlePropertiesUpdater

func (GradlePropertiesUpdater) UpdateGradleProps added in v0.16.10

func (updater GradlePropertiesUpdater) UpdateGradleProps(
	params ActivateForGradleParams,
	logger log.Logger,
	gradleHomePath string,
) error

type OsProxy added in v0.16.10

type OsProxy struct {
	ReadFileIfExists func(pth string) (string, bool, error)
	MkdirAll         func(string, os.FileMode) error
	WriteFile        func(string, []byte, os.FileMode) error
}

func DefaultOsProxy added in v0.16.10

func DefaultOsProxy() OsProxy

type PluginCommonTemplateInventory added in v0.16.10

type PluginCommonTemplateInventory struct {
	AuthToken  string
	Debug      bool
	AppSlug    string
	CIProvider string
}

type TemplateInventory added in v0.16.10

type TemplateInventory struct {
	Common     PluginCommonTemplateInventory
	Cache      CacheTemplateInventory
	Analytics  AnalyticsTemplateInventory
	TestDistro TestDistroTemplateInventory
}

func (TemplateInventory) GenerateInitGradle added in v0.16.10

func (inventory TemplateInventory) GenerateInitGradle(templateProxy TemplateProxy) (string, error)

Generate init.gradle content. Recommended to save the content into $HOME/.gradle/init.d/ instead of overwriting the $HOME/.gradle/init.gradle file.

func (TemplateInventory) HasDependencies added in v0.16.10

func (inventory TemplateInventory) HasDependencies() bool

func (TemplateInventory) WriteToGradleInit added in v0.16.10

func (inventory TemplateInventory) WriteToGradleInit(
	logger log.Logger,
	gradleHomePath string,
	osProxy OsProxy,
	templateProxy TemplateProxy,
) error

type TemplateProxy added in v0.16.10

type TemplateProxy struct {
	// contains filtered or unexported fields
}

func DefaultTemplateProxy added in v0.16.10

func DefaultTemplateProxy() TemplateProxy

type TestDistroParams added in v0.16.10

type TestDistroParams struct {
	Enabled        bool
	JustDependency bool
}

type TestDistroTemplateInventory added in v0.16.10

type TestDistroTemplateInventory struct {
	Usage      UsageLevel
	Version    string
	Endpoint   string
	KvEndpoint string
	Port       int
	LogLevel   string
}

type UsageLevel added in v0.16.10

type UsageLevel string
var (
	UsageLevelNone       UsageLevel = "none"
	UsageLevelDependency UsageLevel = "dependency"
	UsageLevelEnabled    UsageLevel = "enabled"
)

Jump to

Keyboard shortcuts

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