From 4e7b324988eede6d637e974b6576a6ec62acdec1 Mon Sep 17 00:00:00 2001 From: cjand <1747143535@qq.com> Date: Wed, 24 Apr 2024 09:58:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4release=E6=8B=B7=E8=B4=9Ddat?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cjand <1747143535@qq.com> --- packages/flutter_tools/lib/src/ohos/hvigor.dart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/flutter_tools/lib/src/ohos/hvigor.dart b/packages/flutter_tools/lib/src/ohos/hvigor.dart index c5730cedb7..726ef645ee 100644 --- a/packages/flutter_tools/lib/src/ohos/hvigor.dart +++ b/packages/flutter_tools/lib/src/ohos/hvigor.dart @@ -547,12 +547,14 @@ void cleanAndCopyFlutterRuntime( OhosBuildData ohosBuildData) { logger?.printStatus('copy flutter runtime to project start'); // copy ohos font-family support - final File ohosDta = globals.localFileSystem.file(globals.fs.path.join( - ohosProject.flutterRuntimeAssertOriginPath.path, - 'dta', - OHOS_DTA_FILE_NAME)); - final String copyDes = getDatPath(ohosRootPath, ohosProject); - ohosDta.copySync(copyDes); + if (buildInfo.isDebug) { + final File ohosDta = globals.localFileSystem.file(globals.fs.path.join( + ohosProject.flutterRuntimeAssertOriginPath.path, + 'dta', + OHOS_DTA_FILE_NAME)); + final String copyDes = getDatPath(ohosRootPath, ohosProject); + ohosDta.copySync(copyDes); + } final String suffix = getEmbeddingHarFileSuffix(buildInfo, ohosBuildData); // 复制 har 和 so 文件 -- Gitee