Bazel
About Bazel Getting started User guide Reference Extending Community Versions
  • 6.0.0
  • 5.4
  • 5.3.1
  • 4.2.2
  • Nightly
  • More…
  • English
  • Bahasa Indonesia
  • Español – América Latina
  • Português – Brasil
  • Tiếng Việt
  • Türkçe
  • עברית
  • العربيّة
  • فارسی
  • हिंदी
  • বাংলা
  • ภาษาไทย
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어
GitHub Sign in
  • Guides to maximize Bazel's power through advanced concepts and extensions
Concepts Writing rules Distributing rules Design docs APIs
Bazel
  • About Bazel
  • Getting started
  • User guide
  • Reference
  • Extending
    • Concepts
    • Writing rules
    • Distributing rules
    • Design docs
    • APIs
  • Community
  • Versions
    • More
  • GitHub
  • Build API
    • Overview
    • Functions & Constants
    • Modules
      • AndroidNeverLinkLibrariesProvider
      • apple_common
      • apple_toolchain
      • attr
      • bazel_py
      • cc_common
      • cmd_helper
      • config_common
      • coverage_common
      • java_common
      • platform_common
      • proto_common
      • testing
    • Configuration Fragments
      • Overview
      • apple
      • coverage
      • cpp
      • go
      • j2objc
      • java
      • objc
      • platform
      • proto
      • py
      • swift
    • Providers
      • Overview
      • AnalysisTestResultInfo
      • AppleDebugOutputs
      • AppleDynamicFramework
      • AppleExecutableBinary
      • BaselineProfileProvider
      • CcInfo
      • CcStarlarkApiProvider
      • CcToolchainConfigInfo
      • CcToolchainInfo
      • CompilationContext
      • ConstraintCollection
      • ConstraintSettingInfo
      • ConstraintValueInfo
      • DebugPackageInfo
      • DefaultInfo
      • ExecutionInfo
      • FeatureFlagInfo
      • file_provider
      • FilesToRunProvider
      • GeneratedExtensionRegistryProvider
      • IncompatiblePlatformProvider
      • InstrumentedFilesInfo
      • java_compilation_info
      • java_output_jars
      • JavaInfo
      • JavaPluginData
      • JavaPluginInfo
      • JavaRuntimeInfo
      • JavaToolchainInfo
      • ObjcProvider
      • OutputGroupInfo
      • PlatformInfo
      • ProguardSpecProvider
      • ProtoInfo
      • ProtoRegistryProvider
      • PyInfo
      • PyRuntimeInfo
      • RunEnvironmentInfo
      • TemplateVariableInfo
      • ToolchainInfo
      • ToolchainTypeInfo
      • XcodeProperties
      • XcodeVersionConfig
    • Built-in Types
      • Overview
      • Action
      • actions
      • apple_bitcode_mode
      • apple_platform
      • apple_platform_type
      • Args
      • Aspect
      • Attribute
      • bazel_module
      • bazel_module_tags
      • BuildSetting
      • CcCompilationOutputs
      • CcLinkingOutputs
      • config
      • configuration
      • ctx
      • depset
      • DirectoryExpander
      • DottedVersion
      • exec_result
      • ExecGroupCollection
      • ExecGroupContext
      • ExecTransitionFactory
      • FeatureConfiguration
      • File
      • fragments
      • java_annotation_processing
      • java_output
      • Label
      • LateBoundDefault
      • LibraryToLink
      • License
      • LinkerInput
      • LinkingContext
      • module_ctx
      • module_extension
      • native
      • native_rule_transition
      • path
      • ProtoModule
      • Provider
      • repository_ctx
      • repository_os
      • repository_rule
      • root
      • rule
      • rule_attributes
      • runfiles
      • struct
      • SymlinkEntry
      • tag_class
      • Target
      • TemplateDict
      • toolchain_type
      • ToolchainContext
      • transition
    • Core Starlark data types
      • Overview
      • bool
      • builtin_function_or_method
      • dict
      • float
      • function
      • int
      • json
      • list
      • range
      • string
      • tuple
    • Repository rules
      • Overview
      • git
      • http
      • utils
  • 6.0.0
  • 5.4
  • 5.3.1
  • 4.2.2
  • Nightly
  • More…
  • Bazel
  • Extending
  • APIs

Attribute

Stay organized with collections Save and categorize content based on your preferences.
Report an issueopen_in_new View sourceopen_in_new

Representation of a definition of an attribute. Use the attr module to create an Attribute. They are only for use with a rule or an aspect.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-11-08 UTC.

  • About

    • Who's using Bazel
    • Contribute
    • Governance model
  • Stay connected

    • Blog
    • GitHub
    • Twitter
    • YouTube
  • Support

    • Support
    • Issue tracker
    • Slack
    • Stack Overflow
  • Terms
  • Privacy
  • English
  • Bahasa Indonesia
  • Español – América Latina
  • Português – Brasil
  • Tiếng Việt
  • Türkçe
  • עברית
  • العربيّة
  • فارسی
  • हिंदी
  • বাংলা
  • ภาษาไทย
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어