From 501c8547778fe0f6e3cfe884d77c78938f0dd9db Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Wed, 6 Mar 2024 15:27:06 -0800 Subject: kleaf: Update docs (3/3) Update docs for kernel_prebuilt_ext.declare_kernel_prebuilts. Test: TH Change-Id: Ie7d23da9955d4cf3d811a6da7de89875adeed5b0 --- kleaf/docs/api_reference/kernel_prebuilt_ext.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kleaf/docs/api_reference/kernel_prebuilt_ext.md b/kleaf/docs/api_reference/kernel_prebuilt_ext.md index fe939ac..ea76976 100644 --- a/kleaf/docs/api_reference/kernel_prebuilt_ext.md +++ b/kleaf/docs/api_reference/kernel_prebuilt_ext.md @@ -8,9 +8,8 @@ Extension that helps building Android kernel and drivers.
 kernel_prebuilt_ext = use_extension("@kleaf//build/kernel/kleaf:kernel_prebuilt_ext.bzl", "kernel_prebuilt_ext")
-kernel_prebuilt_ext.declare_kernel_prebuilts(name, artifact_url_fmt, auto_download_config,
-                                             build_number, download_config, local_artifact_path,
-                                             mandatory, target)
+kernel_prebuilt_ext.declare_kernel_prebuilts(name, auto_download_config, download_config,
+                                             local_artifact_path, mandatory, target)
 
Extension that manages what prebuilts Kleaf should use. @@ -29,9 +28,7 @@ Declares a repo that contains kernel prebuilts | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | name of repository | Name | required | | -| artifact_url_fmt | API endpoint for Android CI artifacts.

The format may include anchors for the following properties: * {build_number} * {target} * {filename}

Its default value is the API endpoint for http://ci.android.com.

Regardless of whether you are downloading from a remote server with `http://` URLs or from local machine with `file://` URLs, `--config=internet` is needed. Hence, if you want to use local files, set `local_artifact_path`. | String | optional | `"https://androidbuildinternal.googleapis.com/android/internal/build/v3/builds/{build_number}/{target}/attempts/latest/artifacts/{filename}/url?redirect=true"` | | auto_download_config | If `True`, infer `download_config` and `mandatory` from `target`. | Boolean | optional | `False` | -| build_number | build number to be used in `artifact_url_fmt`.

Unlike `kernel_prebuilt_repo`, the environment variable `KLEAF_DOWNLOAD_BUILD_NUMBER_MAP` is **NOT** respected. | String | optional | `""` | | download_config | Configure the list of files to download.

Key: local file name.

Value: remote file name format string, with the following anchors: * {build_number} * {target} | Dictionary: String -> String | optional | `{}` | | local_artifact_path | Directory to local artifacts.

If set, `artifact_url_fmt` is ignored.

Only the root module may call `declare()` with this attribute set.

If relative, it is interpreted against workspace root.

If absolute, this is similar to setting `artifact_url_fmt` to `file:///{filename}`, but avoids using `download()`. Files are symlinked not copied, and `--config=internet` is not necessary. | String | optional | `""` | | mandatory | Configure whether files are mandatory.

Key: local file name.

Value: Whether the file is mandatory.

If a file name is not found in the dictionary, default value is `True`. If mandatory, failure to download the file results in a build failure. | Dictionary: String -> String | optional | `{}` | -- cgit v1.2.3