程式庫和進階服務依附元件資訊清單資源
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
指令碼已啟用的程式庫和進階服務設定組合。
依附元件
依附元件資訊清單設定的頂層。
EnabledAdvancedService
腳本已啟用的進階服務設定。
JSON 表示法 |
{
"serviceId": string,
"userSymbol": string,
"version": string
} |
欄位 |
serviceId |
string
API 探索文件中顯示的服務 ID (例如「drive」)。
|
userSymbol |
string
用於在 Apps Script 專案的程式碼中參照這項服務的 ID。
|
version |
string
服務的啟用版本 (例如「v1」)。
|
媒體庫
指令碼匯入的程式庫設定。
JSON 表示法 |
{
"developmentMode": boolean,
"libraryId": string,
"userSymbol": string,
"version": string
} |
欄位 |
developmentMode |
boolean
如果 true 為 true,系統會忽略 version ,指令碼會使用目前儲存的程式庫專案程式碼,即使該程式碼尚未儲存為新版本也一樣。
|
libraryId |
string
程式庫指令碼專案的指令碼 ID。您可以在程式庫指令碼的網址中找到指令碼 ID,也可以在指令碼編輯器中選取「檔案」>「專案屬性」。
|
userSymbol |
string
指令碼專案程式碼中用來參照這個程式庫的標籤。
|
version |
string
指令碼使用的程式庫版本。這可以是版本號碼或 stable ,表示最後建立的版本。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]