diff --git a/automock/BUILD.gn b/automock/BUILD.gn index 47e67169e9f8fb8613f8ba36bae2b9a503ff290a..e353fd7b7c2df34708fb29518e7bb791d532e8e1 100644 --- a/automock/BUILD.gn +++ b/automock/BUILD.gn @@ -33,6 +33,7 @@ action("gen_node_modules") { } action("gen_snapshot_jsmock") { + deps = ["//interface/sdk-js:build_sdk_interop1"] script = "$mock_root/js_framework_build.sh" js_framework_mock_generate = "$mock_root/mock-generate" is_mac = "false" @@ -56,7 +57,7 @@ action("gen_snapshot_jsmock") { tsconfig = "$mock_root/mock-generate/tsconfig.json" eslint = "$mock_root/mock-generate/.eslintrc" babel = "$mock_root/mock-generate/.babelrc" - api_input_path = "//interface/sdk-js/api" + api_input_path = interface_sdk_path_ets1 + "/api" args = [ rebase_path(buildfile_jsmock, root_build_dir), diff --git a/automock/mock-generate/src/common/commonUtils.ts b/automock/mock-generate/src/common/commonUtils.ts index 6077a4fb9d4639facd042d2326410875e8983dcc..7c2da1984e2fe5ddb87afc96594871ae20cce371 100644 --- a/automock/mock-generate/src/common/commonUtils.ts +++ b/automock/mock-generate/src/common/commonUtils.ts @@ -76,7 +76,7 @@ export function generateKeyValue(key: string, type: KeyValueTypes, parent?: KeyV * 获取开源接口的api路径 */ export function getOhosInterfacesDir(): string { - return path.join(getProjectDir(), 'interface', 'sdk-js', 'api'); + return path.join(getProjectDir(), 'ets1.1', 'sdk-js', 'api'); } /** diff --git a/automock/mock-generate/src/common/systemUtils.ts b/automock/mock-generate/src/common/systemUtils.ts index 6db81b72d304d23c7014ba56c03d943011875f21..f323e4a29380ced1b69b6e1e7f8567e22ad44865 100644 --- a/automock/mock-generate/src/common/systemUtils.ts +++ b/automock/mock-generate/src/common/systemUtils.ts @@ -22,6 +22,6 @@ import { paramIndex } from './constants'; */ export function getProjectDir(): string { const apiInputPath = process.argv[paramIndex]; - const apiDir = path.join('interface', 'sdk-js', 'api'); + const apiDir = path.join('ets1.1', 'sdk-js', 'api'); return apiInputPath.replace(`${path.sep}${apiDir}`, ''); }