Documentation ¶
Index ¶
- Constants
- type Config
- func (c *Config) AddAnnotationProcessorPlugin(annotationClass types.ClassName, processorClass types.ClassName)
- func (c *Config) AddExcludedArtifact(s string) error
- func (c *Config) AttributesForAnnotation(annotation string) (map[string]bzl.Expr, bool)
- func (c Config) ExcludedArtifacts() map[string]struct{}
- func (c *Config) ExtensionEnabled() bool
- func (c *Config) GenerateProto() bool
- func (c *Config) GetAnnotationProcessorPluginClasses(annotationClass types.ClassName) *sorted_set.SortedSet[types.ClassName]
- func (c *Config) GetCustomJavaTestFileSuffixes() *[]string
- func (c *Config) IsJavaTestFile(basename string) bool
- func (c Config) IsModuleRoot() bool
- func (c *Config) IsTestRule(ruleKind string) bool
- func (c *Config) MapAnnotationToAttribute(annotation string, key string, value bzl.Expr)
- func (c *Config) MapAnnotationToWrapper(annotation string, wrapper string)
- func (c Config) MavenInstallFile() string
- func (c *Config) MavenRepositoryName() string
- func (c Config) ModuleGranularity() string
- func (c *Config) NewChild() *Config
- func (c *Config) SetExtensionEnabled(enabled bool)
- func (c *Config) SetGenerateProto(generate bool)
- func (c *Config) SetJavaTestFileSuffixes(suffixesString string) error
- func (c *Config) SetMavenInstallFile(filename string)
- func (c *Config) SetMavenRepositoryName(name string)
- func (c *Config) SetModuleGranularity(granularity string) error
- func (c *Config) SetTestMode(mode string) error
- func (c Config) TestMode() string
- func (c *Config) WrapperForAnnotation(annotation string) (string, bool)
- type Configs
- type LoadInfo
Constants ¶
View Source
const ( // JavaExcludeArtifact tells the resolver to disregard a given maven artifact. // Can be repeated. JavaExcludeArtifact = "java_exclude_artifact" // JavaExtensionDirective represents the directive that controls whether // this Java extension is enabled or not. Sub-packages inherit this value. // Can be either "enabled" or "disabled". Defaults to "enabled". JavaExtensionDirective = "java_extension" // JavaMavenInstallFile represents the directive that controls where the // maven_install.json file is located. // Defaults to "maven_install.json". JavaMavenInstallFile = "java_maven_install_file" // JavaModuleGranularityDirective represents the directive that controls whether // this Java module has a module granularity (Gradle) or a package // granularity (bazel). // Can be either "package" or "module". Defaults to "package". JavaModuleGranularityDirective = "java_module_granularity" // JavaTestFileSuffixes indicates within a test directory which files are test classes vs utility classes, // based on their basename. // It should be set up to match the value used for java_test_suite's test_suffixes attribute. // Accepted values are a comma-delimited list of strings. JavaTestFileSuffixes = "java_test_file_suffixes" // JavaTestMode allows user to choose from per file test or per directory test suite. JavaTestMode = "java_test_mode" // JavaGenerateProto tells the code generator whether to generate `java_proto_library` (and `java_library`) // rules when a `proto_library` rule is present. // Can be either "true" or "false". Defaults to "true". JavaGenerateProto = "java_generate_proto" // JavaMavenRepositoryName tells the code generator what the repository name that contains all maven dependencies is. // Defaults to "maven" JavaMavenRepositoryName = "java_maven_repository_name" // JavaAnnotationProcessorPlugin tells the code generator about specific java_plugin targets needed to process // specific annotations. JavaAnnotationProcessorPlugin = "java_annotation_processor_plugin" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents a config extension for a specific Bazel package.
func (*Config) AddAnnotationProcessorPlugin ¶ added in v0.26.0
func (*Config) AddExcludedArtifact ¶ added in v0.10.0
func (*Config) AttributesForAnnotation ¶ added in v0.6.0
func (Config) ExcludedArtifacts ¶ added in v0.10.0
func (*Config) ExtensionEnabled ¶ added in v0.6.0
ExtensionEnabled returns whether the extension is enabled or not.
func (*Config) GenerateProto ¶ added in v0.14.0
func (*Config) GetAnnotationProcessorPluginClasses ¶ added in v0.26.0
func (*Config) GetCustomJavaTestFileSuffixes ¶ added in v0.10.0
func (*Config) IsJavaTestFile ¶ added in v0.10.0
func (Config) IsModuleRoot ¶
func (*Config) IsTestRule ¶ added in v0.24.0
func (*Config) MapAnnotationToAttribute ¶ added in v0.6.0
func (*Config) MapAnnotationToWrapper ¶ added in v0.24.0
func (Config) MavenInstallFile ¶
func (*Config) MavenRepositoryName ¶ added in v0.18.0
func (Config) ModuleGranularity ¶
func (*Config) NewChild ¶
NewChild creates a new child Config. It inherits desired values from the current Config and sets itself as the parent to the child.
func (*Config) SetExtensionEnabled ¶ added in v0.6.0
SetExtensionEnabled sets whether the extension is enabled or not.
func (*Config) SetGenerateProto ¶ added in v0.14.0
func (*Config) SetJavaTestFileSuffixes ¶ added in v0.10.0
func (*Config) SetMavenInstallFile ¶
func (*Config) SetMavenRepositoryName ¶ added in v0.18.0
func (*Config) SetModuleGranularity ¶
func (*Config) SetTestMode ¶
type Configs ¶
Configs is an extension of map[string]*Config. It provides finding methods on top of the mapping.
func (*Configs) ParentForPackage ¶
ParentForPackage returns the parent Config for the given Bazel package.
Click to show internal directories.
Click to hide internal directories.