TAG CLASSES
Modifies an artifact with coordinates
defined in other tags with additional properties.
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | - | Name | optional | "maven" |
coordinates | Coordinates of the artifact to amend. Only group:artifact are used for matching. | String | required | |
exclusions | Maven artifact tuples, in artifactId:groupId format | List of strings | optional | [] |
force_version | - | Boolean | optional | False |
neverlink | - | Boolean | optional | False |
testonly | - | Boolean | optional | False |
Used to define a single artifact where the simple coordinates are insufficient. Will be added to the other artifacts declared by tags with the same name
attribute.
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | - | Name | optional | "maven" |
artifact | - | String | required | |
classifier | - | String | optional | "" |
exclusions | Maven artifact tuples, in artifactId:groupId format | List of strings | optional | [] |
force_version | - | Boolean | optional | False |
group | - | String | required | |
neverlink | - | Boolean | optional | False |
packaging | - | String | optional | "" |
testonly | - | Boolean | optional | False |
version | - | String | optional | "" |
Allows a project to import dependencies from a Gradle format libs.versions.toml
file.
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | - | Name | optional | "maven" |
bom_modules | List of modules in group:artifact format to treat as BOMs, not artifacts | List of strings | optional | [] |
libs_versions_toml | Gradle libs.versions.toml file to use | Label | required |
Combines artifact and bom declarations with setting the location of lock files to use, and repositories to download artifacts from. There can only be one install
tag with a given name
per module. install
tags with the same name across multiple modules will be merged, with the root module taking precedence.
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | - | Name | optional | "maven" |
aar_import_bzl_label | The label (as a string) to use to import aar_import from | String | optional | "@build_bazel_rules_android//android:rules.bzl" |
additional_coursier_options | Additional options that will be passed to coursier. | List of strings | optional | [] |
additional_netrc_lines | Additional lines prepended to the netrc file used by http_file (with maven_install_json only). | List of strings | optional | [] |
artifacts | Maven artifact tuples, in artifactId:groupId:version format | List of strings | optional | [] |
boms | Maven BOM tuples, in artifactId:groupId:version format | List of strings | optional | [] |
duplicate_version_warning | What to do if there are duplicate artifacts If “error”, then print a message and fail the build. If “warn”, then print a warning and continue. If “none”, then do nothing. | String | optional | "warn" |
excluded_artifacts | Artifacts to exclude, in artifactId:groupId format. Only used on unpinned installs | List of strings | optional | [] |
exclusions | Maven artifact tuples, in artifactId:groupId format | List of strings | optional | [] |
fail_if_repin_required | Whether to fail the build if the maven_artifact inputs have changed but the lock file has not been repinned. | Boolean | optional | True |
fail_on_missing_checksum | - | Boolean | optional | True |
fetch_javadoc | - | Boolean | optional | False |
fetch_sources | - | Boolean | optional | False |
generate_compat_repositories | Additionally generate repository aliases in a .bzl file for all JAR artifacts. For example, @maven//:com_google_guava_guava can also be referenced as @com_google_guava_guava//jar . | Boolean | optional | False |
ignore_empty_files | Treat jars that are empty as if they were not found. | Boolean | optional | False |
known_contributing_modules | List of Bzlmod modules that are known to be contributing to this repository. Only honoured for the root module. | List of strings | optional | [] |
lock_file | - | Label | optional | None |
repin_instructions | Instructions to re-pin the repository if required. Many people have wrapper scripts for keeping dependencies up to date, and would like to point users to that instead of the default. Only honoured for the root module. | String | optional | "" |
repositories | - | List of strings | optional | ["https://repo1.maven.org/maven2"] |
resolve_timeout | - | Integer | optional | 600 |
resolver | The resolver to use. Only honoured for the root module. | String | optional | "coursier" |
strict_visibility | Controls visibility of transitive dependencies. If “True”, transitive dependencies are private and invisible to user‘s rules. If “False”, transitive dependencies are public and visible to user’s rules. | Boolean | optional | False |
strict_visibility_value | - | List of labels | optional | ["@rules_jvm_external//visibility:private"] |
use_credentials_from_home_netrc_file | Whether to pass machine login credentials from the ~/.netrc file to coursier. | Boolean | optional | False |
use_starlark_android_rules | Whether to use the native or Starlark version of the Android rules. | Boolean | optional | False |
version_conflict_policy | Policy for user-defined vs. transitive dependency version conflicts If “pinned”, choose the user-specified version in maven_install unconditionally. If “default”, follow Coursier's default policy. | String | optional | "default" |
Allows specific maven coordinates to be redirected elsewhere. Commonly used to replace an external dependency with another, or a compatible implementation from within this module.
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | - | Name | optional | "maven" |
coordinates | Maven artifact tuple in artifactId:groupId format | String | required | |
target | Target to use in place of maven coordinates | Label | required |