库和高级服务依赖项清单资源
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
脚本已启用的库和高级服务的配置集。
依赖项
依赖项清单配置的顶级元素。
EnabledAdvancedService
脚本已启用的高级服务的配置。
JSON 表示法 |
{
"serviceId": string,
"userSymbol": string,
"version": string
} |
字段 |
serviceId |
string
API 发现文档中显示的服务标识符(例如,“drive”)。
|
userSymbol |
string
用于在 Apps 脚本项目的代码中引用此服务的标识符。
|
version |
string
已启用的服务版本(例如“v1”)。
|
媒体库
脚本已导入的库的配置。
JSON 表示法 |
{
"developmentMode": boolean,
"libraryId": string,
"userSymbol": string,
"version": string
} |
字段 |
developmentMode |
boolean
如果值为 true ,则忽略 version ,脚本会使用当前库项目已保存的代码,即使该代码尚未保存到新版本也是如此。
|
libraryId |
string
相应库的脚本项目的脚本 ID。您可以在库脚本的网址中找到脚本 ID,也可以在脚本编辑器中依次选择文件 > 项目属性 来找到脚本 ID。
|
userSymbol |
string
在脚本项目代码中用于引用此库的标签。
|
version |
string
脚本使用的库的版本。此值可以是版本号,也可以是 stable ,表示创建的最后一个版本。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eDefines configurations for libraries and advanced services used by a script.\u003c/p\u003e\n"],["\u003cp\u003eOutlines the structure for declaring dependencies, including enabled advanced services and libraries.\u003c/p\u003e\n"],["\u003cp\u003eSpecifies how to configure individual advanced services with their ID, user symbol, and version.\u003c/p\u003e\n"],["\u003cp\u003eDetails the configuration of imported libraries, including development mode, library ID, user symbol, and version.\u003c/p\u003e\n"]]],[],null,["# Libraries and advanced services dependencies manifest resource\n\nThe set of configurations for the [libraries](/apps-script/guides/libraries) and\n[advanced services](/apps-script/guides/services/advanced) the script has\nenabled.\n\nDependencies\n------------\n\nThe top-level of the dependency manifest configuration.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------|\n| ```text { \"enabledAdvancedServices\": [ { object (EnabledAdvancedService) } ], \"libraries\": [ { object (Library) } ] } ``` |\n\n| Fields ||\n|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `enabledAdvancedServices[]` | `object (`[EnabledAdvancedService](#enabledadvancedservice)`)` The list of [advanced services](/apps-script/guides/services/advanced) enabled for use by the script project. |\n| `libraries[]` | `object (`[Library](#library)`)` The list of [libraries](/apps-script/guides/libraries) used by the script project. |\n\n### EnabledAdvancedService\n\nThe configuration of an [advanced service](/apps-script/guides/services/advanced)\nthe script has enabled.\n\n| JSON representation |\n|------------------------------------------------------------------------------|\n| ```text { \"serviceId\": string, \"userSymbol\": string, \"version\": string } ``` |\n\n| Fields ||\n|--------------|------------------------------------------------------------------------------------------------------------|\n| `serviceId` | `string` The identifier of the service that is shown in the API discovery document (for example, \"drive\"). |\n| `userSymbol` | `string` The identifier used to refer to this service in the code of the Apps Script project. |\n| `version` | `string` The enabled version of the service (for example, \"v1\"). |\n\n### Library\n\nThe configuration of a [library](/apps-script/guides/libraries)\nthe script has imported.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------|\n| ```carbon { \"developmentMode\": boolean, \"libraryId\": string, \"userSymbol\": string, \"version\": string } ``` |\n\n| Fields ||\n|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `developmentMode` | `boolean` If `true`, `version` is ignored and the script uses the current library project saved code, even if that code hasn't been saved to a new version. |\n| `libraryId` | `string` The script ID of the library's script project. You can find a script ID in the library script's URL or in the script editor by selecting **File \\\u003e Project properties**. |\n| `userSymbol` | `string` The label that is used in the script project code to refer to this library. |\n| `version` | `string` The version of the library that is used by the script. This is either a version number or `stable`, meaning the last version created. |"]]