diff --git a/ets2panda/driver/build_system/src/plugins/plugins_driver.ts b/ets2panda/driver/build_system/src/plugins/plugins_driver.ts index 4af2ec6aad84af74ab156975ba850ee4dc42de2a..c8d2253cc55f4d1e85c36e2501e95e638e9bd8a9 100644 --- a/ets2panda/driver/build_system/src/plugins/plugins_driver.ts +++ b/ets2panda/driver/build_system/src/plugins/plugins_driver.ts @@ -166,6 +166,20 @@ export class PluginDriver { } this.logger.printInfo(`Loaded plugin: ', ${key}, ${pluginObject}`); + if (pluginObject.initApiCheckConfig) { + try { + pluginObject.initApiCheckConfig(projectConfig); + this.logger.printInfo(`Called initApiCheckConfig for plugin: ${key}`); + } catch (apiCheckError) { + const logData: LogData = LogDataFactory.newInstance( + ErrorCode.BUILDSYSTEM_LOAD_PLUGIN_FAIL, + 'Failed to call initApiCheckConfig.', + apiCheckError instanceof Error ? apiCheckError.message : String(apiCheckError) + ); + this.logger.printError(logData); + } + } + return { name: key, init: initFunction