From 142c372394660ff5293235af27fbac5226225e57 Mon Sep 17 00:00:00 2001 From: zmtzawqlp Date: Wed, 3 Jan 2024 09:55:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=20=E7=A7=BB=E9=99=A4=E7=94=A8=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=AD=BE=E5=90=8D=E7=9A=84=E6=AD=A5=E9=AA=A4=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=20Deveco=20Studio=20=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=E7=9A=84=E6=96=87=E6=A1=A3=20Signed-off-by:=20zmtzawq?= =?UTF-8?q?lp=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 57 ++----------------- README.md | 57 ++----------------- .../flutter_tools/lib/src/ohos/hvigor.dart | 2 + 3 files changed, 14 insertions(+), 102 deletions(-) diff --git a/README.en.md b/README.en.md index 10b4ed164d..fb4f8aeec3 100644 --- a/README.en.md +++ b/README.en.md @@ -60,57 +60,12 @@ This repository is a compatible extension of Flutter SDK for the OpenHarmony pla export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn ``` - 4. Configure the signing tool - - - Download [Signature Tool](https://gitee.com/openharmony/developtools_hapsigner) and configure the environment variable SIGN_TOOL_HOME. - - ``` - export SIGN_TOOL_HOME=/home//ohos/developtools_hapsigner/autosign - ``` - - - Execute the gradle command to compile and obtain hap-sign-tool.jar. Make sure it is in the directory: ./hapsigntool/hap_sign_tool/build/libs/hap-sign-tool.jar. (gradle version recommended 7.x) - - ``` - gradle build - ``` - - - Edit the `autosign.config` and `createAppCertAndProfile.config` files in the autosign directory and modify their values: - - ``` - sign.profile.inFile=profile_tmp.json - ``` - - - In the autosign directory (the command `chmod 777 *.sh` must be executed first in linux and mac environments, and there is no need to execute this command in Windows environment), add the `profile_tmp_template.json` file and edit it as follows: - - ``` - { - "version-name": "2.0.0", - "version-code": 2, - "app-distribution-type": "os_integration", - "uuid": "5027b99e-5f9e-465d-9508-a9e0134ffe18", - "validity": { - "not-before": 1594865258, - "not-after": 1689473258 - }, - "type": "release", - "bundle-info": { - "developer-id": "OpenHarmony", - "distribution-certificate": "-----BEGIN CERTIFICATE-----\nMIICSTCCAc+gAwIBAgIFAJV7uNUwCgYIKoZIzj0EAwIwYzELMAkGA1UEBhMCQ04x\nFDASBgNVBAoMC09wZW5IYXJtb255MRkwFwYDVQQLDBBPcGVuSGFybW9ueS BUZWT ZMBcGA1UECwwQT3Blbkhhcm1vbnkgVGVhbTEoMCYGA1UEAwwf\nT3Blbkhhcm1vbnkgQXBwbGljYXRpb24gUmVsZWFzZTBZMBMGByqGSM49AgEGCCqG\nSM49AwEHA0IABAW8pFu7tHGUuWtddD5wvazc1qN8t s9UPZH4pecbb/bSFWKh7X7R\n/eTVaRrCTSSdovI1dhoV5GjuFsKW+jT2TwSjazBpMB0GA1UdDgQWBBScyywAaAMj\nI7HcuIS42lvZx0Lj+zAJBgNVHRMEAjAAMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUE\ nDDAKBggrBgEFBQcDAzAYBgwrBgEEAY9bAoJ4AQMECDAGAgEBCgEAMAoGCCqGSM49\nBAMCA2gAMGUCFfNidGo6uK6KGT9zT1T5bY1NCHTH3P3muy5X1xudOgxWoOqIbnk\ntmQYB78dxWEHLQIxANfApAlXAD/0 hnyNC8RDzfLOPEeay6jU9FXJj3AoR90rwZpR\noN9sYD6Oks4VGRw6yQ==\n-----END CERTIFICATE-----\n", - "bundle-name": "{{ohosId}}", - "apl": "normal", - "app-feature": "hos_normal_app" - }, - "acls": { - "allowed-acls": [ - "" - ] - }, - "permissions": { - "restricted-permissions": [] - }, - "issuer": "pki_internal" - } - ``` + 4. Automatically generate signature config + + * Open the ohos directory of the project using Deveco Studio. + * Click on File > Project Structure > Project > Signing Configs. Check the Automatically generate signature option, wait for the automatic signing process to complete, and then click OK. + * Review the configuration information in build-profile.json5. Add the certificate information generated from the automatic signing process to the configuration. + 5. The application build relies on [Flutter Engine](https://github.com/flutter/engine) to build products: `ohos_debug_unopt_arm64` and `ohos_release_arm64`. Please add: `--local-engine= in the Flutter Tools command running parameters. \` diff --git a/README.md b/README.md index 8ee6acfd40..791e229e7f 100644 --- a/README.md +++ b/README.md @@ -60,57 +60,12 @@ Flutter SDK 仓库 export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn ``` - 4. 配置签名工具 - - - 下载[签名工具](https://gitee.com/openharmony/developtools_hapsigner),并配置环境变量SIGN_TOOL_HOME。 - - ``` - export SIGN_TOOL_HOME=/home//ohos/developtools_hapsigner/autosign - ``` - - - 执行gradle命令编译得到hap-sign-tool.jar,确保其在目录:./hapsigntool/hap_sign_tool/build/libs/hap-sign-tool.jar。(gradle版本推荐7.x) - - ``` - gradle build - ``` - - - 编辑autosign目录下`autosign.config`和`createAppCertAndProfile.config`文件,并修改其中值: - - ``` - sign.profile.inFile=profile_tmp.json - ``` - - - 在autosign目录下( linux和mac环境下须先执行命令 `chmod 777 *.sh` ,Windows环境下无需执行此命令 ),新增`profile_tmp_template.json`文件,编辑如下: - - ``` - { - "version-name": "2.0.0", - "version-code": 2, - "app-distribution-type": "os_integration", - "uuid": "5027b99e-5f9e-465d-9508-a9e0134ffe18", - "validity": { - "not-before": 1594865258, - "not-after": 1689473258 - }, - "type": "release", - "bundle-info": { - "developer-id": "OpenHarmony", - "distribution-certificate": "-----BEGIN CERTIFICATE-----\nMIICSTCCAc+gAwIBAgIFAJV7uNUwCgYIKoZIzj0EAwIwYzELMAkGA1UEBhMCQ04x\nFDASBgNVBAoMC09wZW5IYXJtb255MRkwFwYDVQQLDBBPcGVuSGFybW9ueSBUZWFt\nMSMwIQYDVQQDDBpPcGVuSGFybW9ueSBBcHBsaWNhdGlvbiBDQTAeFw0yMjAxMjkw\nNTU0MTRaFw0yMzAxMjkwNTU0MTRaMGgxCzAJBgNVBAYTAkNOMRQwEgYDVQQKDAtP\ncGVuSGFybW9ueTEZMBcGA1UECwwQT3Blbkhhcm1vbnkgVGVhbTEoMCYGA1UEAwwf\nT3Blbkhhcm1vbnkgQXBwbGljYXRpb24gUmVsZWFzZTBZMBMGByqGSM49AgEGCCqG\nSM49AwEHA0IABAW8pFu7tHGUuWtddD5wvazc1qN8ts9UPZH4pecbb/bSFWKh7X7R\n/eTVaRrCTSSdovI1dhoV5GjuFsKW+jT2TwSjazBpMB0GA1UdDgQWBBScyywAaAMj\nI7HcuIS42lvZx0Lj+zAJBgNVHRMEAjAAMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUE\nDDAKBggrBgEFBQcDAzAYBgwrBgEEAY9bAoJ4AQMECDAGAgEBCgEAMAoGCCqGSM49\nBAMCA2gAMGUCMFfNidGo6uK6KGT9zT1T5bY1NCHTH3P3muy5X1xudOgxWoOqIbnk\ntmQYB78dxWEHLQIxANfApAlXAD/0hnyNC8RDzfLOPEeay6jU9FXJj3AoR90rwZpR\noN9sYD6Oks4VGRw6yQ==\n-----END CERTIFICATE-----\n", - "bundle-name": "{{ohosId}}", - "apl": "normal", - "app-feature": "hos_normal_app" - }, - "acls": { - "allowed-acls": [ - "" - ] - }, - "permissions": { - "restricted-permissions": [] - }, - "issuer": "pki_internal" - } - ``` + 4. 配置签名 + + * 用 `Deveco Studio` 打开项目的 `ohos` 目录 + * 单击 `File > Project Structure > Project > Signing Configs` 界面勾选 `Automatically generate signature`,等待自动签名完成即可,单击 `OK`。 + * 查看 `build-profile.json5` 配置信息,配置信息中增加自动签名生成的证书信息。 + 5. 应用构建依赖[Flutter Engine](https://github.com/flutter/engine)构建产物:`ohos_debug_unopt_arm64` 与 `ohos_release_arm64`,请在Flutter Tools指令运行参数中添加:`--local-engine=\` diff --git a/packages/flutter_tools/lib/src/ohos/hvigor.dart b/packages/flutter_tools/lib/src/ohos/hvigor.dart index b3ba711c9a..2ea006dcec 100644 --- a/packages/flutter_tools/lib/src/ohos/hvigor.dart +++ b/packages/flutter_tools/lib/src/ohos/hvigor.dart @@ -695,6 +695,8 @@ class OhosHvigorBuilder implements OhosBuilder { throwToolExit('assembleHap error! please check log.'); } + return; + final String unsignedFile = globals.fs.path.join( ohosRootPath, ohosProject.mainModuleName, -- Gitee From 29614147fd1bb6be5f642c1e9a1114e8bc143b6d Mon Sep 17 00:00:00 2001 From: zmtzawqlp Date: Wed, 3 Jan 2024 11:16:02 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E7=94=9F=E6=88=90=E4=BA=86=E7=AD=BE=E5=90=8D?= =?UTF-8?q?hap=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=EF=BC=8C?= =?UTF-8?q?=E8=B5=B0=E7=AD=BE=E5=90=8D=E5=B7=A5=E5=85=B7=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E3=80=82=20Signed-off-by:=20zmtzawqlp=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 58 ++++++++++++++-- README.md | 66 +++++++++++++++++-- .../flutter_tools/lib/src/ohos/hvigor.dart | 18 +++-- 3 files changed, 126 insertions(+), 16 deletions(-) diff --git a/README.en.md b/README.en.md index fb4f8aeec3..2a6eb00fe3 100644 --- a/README.en.md +++ b/README.en.md @@ -60,12 +60,60 @@ This repository is a compatible extension of Flutter SDK for the OpenHarmony pla export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn ``` - 4. Automatically generate signature config + 4. Signature + + You can sign the application using either of the following two methods. - * Open the ohos directory of the project using Deveco Studio. - * Click on File > Project Structure > Project > Signing Configs. Check the Automatically generate signature option, wait for the automatic signing process to complete, and then click OK. - * Review the configuration information in build-profile.json5. Add the certificate information generated from the automatic signing process to the configuration. - + (1) Signing with `Deveco Studio` + + - Open the ohos directory of the project using Deveco Studio. + - Click on File > Project Structure > Project > Signing Configs. Check the Automatically generate signature option, wait for the automatic signing process to complete, and then click OK. + - Review the configuration information in build-profile.json5. Add the certificate information generated from the automatic signing process to the configuration. + + (2) Signing with signing tool + + - Download [Signature Tool](https://gitee.com/openharmony/developtools_hapsigner) and configure theenvironment variable SIGN_TOOL_HOME. + ``` + export SIGN_TOOL_HOME=/home//ohos/developtools_hapsigner/autosign + ``` + - Execute the gradle command to compile and obtain hap-sign-tool.jar. Make sure it is in thedirectory: ./ hapsigntool/hap_sign_tool/build/libs/hap-sign-tool.jar. (gradle version recommended 7.x) + ``` + gradle build + ``` + - Edit the `autosign.config` and `createAppCertAndProfile.config` files in the autosign directory andmodify their values: + ``` + sign.profile.inFile=profile_tmp.json + ``` + - In the autosign directory (the command `chmod 777 *.sh` must be executed first in linux and macenvironments, and there is no need to execute this command in Windows environment), add the`profile_tmp_template.json` file and edit it as follows: + ``` + { + "version-name": "2.0.0", + "version-code": 2, + "app-distribution-type": "os_integration", + "uuid": "5027b99e-5f9e-465d-9508-a9e0134ffe18", + "validity": { + "not-before": 1594865258, + "not-after": 1689473258 + }, + "type": "release", + "bundle-info": { + "developer-id": "OpenHarmony", + "distribution-certificate": "-----BEGIN CERTIFICATE-----\nMIICSTCCA +gAwIBAgIFAJV7uNUwCgYIKoZIzj0EAwIwYzELMAkGA1UEBhMCQ04x\nFDASBgNVBAoMC09wZW5IYXJtb255MRkwFwYDVQLDBB PcGVuSGFybW9ueS BUZWTZMBcGA1UECwwQT3Blbkhhcm1vbnkgVGVhbTEoMCYGA1UEAwwf\nT3Blbkhhcm1vbnkgQXBwbGljYXRpb24gUmVsZWFzZT ZMBMGByqGSM49AgEGCCqG\nSM49AwEHA0IABAW8pFu7tHGUuWtddD5wvazc1qN8t s9UPZH4pecbb/ bSFWKh7X7R\neTVaRrCTSSdovI1dhoV5GjuFsKW+jT2TwSjazBpMB0GA1UdDgQWBBScyywAaAMj\nI7HcuIS42lvZx0L +zAJBgNVHRMEAjAAMA4GA1UdDwEB/ wQEAwIHgDATBgNVHSUE\nDDAKBggrBgEFBQcDAzAYBgwrBgEEAY9bAoJ4AQMECDAGAgEBCgEAMAoGCCqGSM49\nBAMCA2gAMGU CFfNidGo6uK6KGTzT1T5bY1NCHTH3P3muy5X1xudOgxWoOqIbnk\ntmQYB78dxWEHLQIxANfApAlXAD/ 0hnyNC8RDzfLOPEeay6jU9FXJj3AoR90rwZpR\noN9sYD6Oks4VGRw6yQ==\n-----END CERTIFICATE-----\n", + "bundle-name": "{{ohosId}}", + "apl": "normal", + "app-feature": "hos_normal_app" + }, + "acls": { + "allowed-acls": [ + "" + ] + }, + "permissions": { + "restricted-permissions": [] + }, + "issuer": "pki_internal" + } + ``` 5. The application build relies on [Flutter Engine](https://github.com/flutter/engine) to build products: `ohos_debug_unopt_arm64` and `ohos_release_arm64`. Please add: `--local-engine= in the Flutter Tools command running parameters. \` diff --git a/README.md b/README.md index 791e229e7f..d8bb40500c 100644 --- a/README.md +++ b/README.md @@ -61,11 +61,67 @@ Flutter SDK 仓库 ``` 4. 配置签名 - - * 用 `Deveco Studio` 打开项目的 `ohos` 目录 - * 单击 `File > Project Structure > Project > Signing Configs` 界面勾选 `Automatically generate signature`,等待自动签名完成即可,单击 `OK`。 - * 查看 `build-profile.json5` 配置信息,配置信息中增加自动签名生成的证书信息。 - + + 你可以通过下面 2 种方式中任意一种对应用进行签名。 + + (1) 使用 `Deveco Studio` 签名 + + - 用 `Deveco Studio` 打开项目的 `ohos` 目录 + - 单击 `File > Project Structure > Project > Signing Configs` 界面勾选 `Automatically generate signature`,等待自动签名完成即可,单击 `OK`。 + - 查看 `build-profile.json5` 配置信息,配置信息中增加自动签名生成的证书信息。 + + (2) 使用 [签名工具](https://gitee.com/openharmony/developtools_hapsigner) 签名 + + - 下载[签名工具](https://gitee.com/openharmony/developtools_hapsigner),并配置环境变量SIGN_TOOL_HOME。 + + ``` + export SIGN_TOOL_HOME=/home//ohos/developtools_hapsigner/autosign + ``` + + - 执行gradle命令编译得到hap-sign-tool.jar,确保其在目录:./hapsigntool/hap_sign_tool/build/libs/hap-sign-tool.jar。(gradle版本推荐7.x) + + ``` + gradle build + ``` + + - 编辑autosign目录下`autosign.config`和`createAppCertAndProfile.config`文件,并修改其中值: + + ``` + sign.profile.inFile=profile_tmp.json + ``` + + - 在autosign目录下( linux和mac环境下须先执行命令 `chmod 777 *.sh` ,Windows环境下无需执行此命令 ),新增`profile_tmp_template.json`文件,编辑如下: + + ``` + { + "version-name": "2.0.0", + "version-code": 2, + "app-distribution-type": "os_integration", + "uuid": "5027b99e-5f9e-465d-9508-a9e0134ffe18", + "validity": { + "not-before": 1594865258, + "not-after": 1689473258 + }, + "type": "release", + "bundle-info": { + "developer-id": "OpenHarmony", + "distribution-certificate": "-----BEGIN CERTIFICATE-----\nMIICSTCCAc+gAwIBAgIFAJV7uNUwCgYIKoZIzj0EAwIwYzELMAkGA1UEBhMCQ04x\nFDASBgNVBAoMC09wZW5IYXJtb255MRkwFwYDVQQLDBBPcGVuSGFybW9ueSBUZWFt\nMSMwIQYDVQQDDBpPcGVuSGFybW9ueSBBcHBsaWNhdGlvbiBDQTAeFw0yMjAxMjkw\nNTU0MTRaFw0yMzAxMjkwNTU0MTRaMGgxCzAJBgNVBAYTAkNOMRQwEgYDVQQKDAtP\ncGVuSGFybW9ueTEZMBcGA1UECwwQT3Blbkhhcm1vbnkgVGVhbTEoMCYGA1UEAwwf\nT3Blbkhhcm1vbnkgQXBwbGljYXRpb24gUmVsZWFzZTBZMBMGByqGSM49AgEGCCqG\nSM49AwEHA0IABAW8pFu7tHGUuWtddD5wvazc1qN8ts9UPZH4pecbb/bSFWKh7X7R\n/eTVaRrCTSSdovI1dhoV5GjuFsKW+jT2TwSjazBpMB0GA1UdDgQWBBScyywAaAMj\nI7HcuIS42lvZx0Lj+zAJBgNVHRMEAjAAMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUE\nDDAKBggrBgEFBQcDAzAYBgwrBgEEAY9bAoJ4AQMECDAGAgEBCgEAMAoGCCqGSM49\nBAMCA2gAMGUCMFfNidGo6uK6KGT9zT1T5bY1NCHTH3P3muy5X1xudOgxWoOqIbnk\ntmQYB78dxWEHLQIxANfApAlXAD/0hnyNC8RDzfLOPEeay6jU9FXJj3AoR90rwZpR\noN9sYD6Oks4VGRw6yQ==\n-----END CERTIFICATE-----\n", + "bundle-name": "{{ohosId}}", + "apl": "normal", + "app-feature": "hos_normal_app" + }, + "acls": { + "allowed-acls": [ + "" + ] + }, + "permissions": { + "restricted-permissions": [] + }, + "issuer": "pki_internal" + } + ``` + 5. 应用构建依赖[Flutter Engine](https://github.com/flutter/engine)构建产物:`ohos_debug_unopt_arm64` 与 `ohos_release_arm64`,请在Flutter Tools指令运行参数中添加:`--local-engine=\` diff --git a/packages/flutter_tools/lib/src/ohos/hvigor.dart b/packages/flutter_tools/lib/src/ohos/hvigor.dart index 2ea006dcec..4eeab89d5c 100644 --- a/packages/flutter_tools/lib/src/ohos/hvigor.dart +++ b/packages/flutter_tools/lib/src/ohos/hvigor.dart @@ -695,18 +695,24 @@ class OhosHvigorBuilder implements OhosBuilder { throwToolExit('assembleHap error! please check log.'); } - return; - - final String unsignedFile = globals.fs.path.join( + final String desSignedFile = globals.fs.path.join( ohosRootPath, ohosProject.mainModuleName, 'build/default/outputs/default', - 'entry-default-unsigned.hap'); - final String desSignedFile = globals.fs.path.join( + 'entry-default-signed.hap'); + + + final File signedFile= globals.localFileSystem.file(desSignedFile); + if(signedFile.existsSync()) { + return; + } + + + final String unsignedFile = globals.fs.path.join( ohosRootPath, ohosProject.mainModuleName, 'build/default/outputs/default', - 'entry-default-signed.hap'); + 'entry-default-unsigned.hap'); await signHap(globals.localFileSystem, unsignedFile, desSignedFile, logger, ohosBuildData.appInfo!.bundleName); -- Gitee From 877ea600ea0a0fb8cf0c0f3b09cebdaa95ef7123 Mon Sep 17 00:00:00 2001 From: zmtzawqlp Date: Wed, 3 Jan 2024 11:43:51 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=20=E5=85=88=E6=A3=80=E6=9F=A5=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=9C=89=E7=AD=BE=E5=90=8D=EF=BC=8C=E6=9C=89=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=EF=BC=8C=E6=A3=80=E6=9F=A5=E6=98=AF=E5=90=A6=E7=94=9F?= =?UTF-8?q?=E6=88=90=E7=AD=BE=E5=90=8Dhap=EF=BC=8C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=9A=84=E8=AF=9D=E5=86=8D=E5=B0=9D=E8=AF=95=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E7=AD=BE=E5=90=8D=20Signed-off-by:=20zmtzawq?= =?UTF-8?q?lp=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flutter_tools/lib/src/ohos/hvigor.dart | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/flutter_tools/lib/src/ohos/hvigor.dart b/packages/flutter_tools/lib/src/ohos/hvigor.dart index 4eeab89d5c..84e28fa300 100644 --- a/packages/flutter_tools/lib/src/ohos/hvigor.dart +++ b/packages/flutter_tools/lib/src/ohos/hvigor.dart @@ -15,6 +15,7 @@ import 'dart:io'; +import 'package:json5/json5.dart'; import 'package:process/process.dart'; import '../artifacts.dart'; @@ -700,13 +701,17 @@ class OhosHvigorBuilder implements OhosBuilder { ohosProject.mainModuleName, 'build/default/outputs/default', 'entry-default-signed.hap'); - - - final File signedFile= globals.localFileSystem.file(desSignedFile); - if(signedFile.existsSync()) { - return; - } - + + final File buildProfile= FlutterProject.current().ohos.getBuildProfileFile(); + final String buildProfileConfig = buildProfile.readAsStringSync(); + final dynamic obj = JSON5.parse(buildProfileConfig); + dynamic signingConfigs = obj['app']?['signingConfigs']; + if(signingConfigs is List && signingConfigs.isNotEmpty){ + final File signedFile= globals.localFileSystem.file(desSignedFile); + if(signedFile.existsSync()) { + return; + } + } final String unsignedFile = globals.fs.path.join( ohosRootPath, -- Gitee From a3cef6f3466432d66333fbb928b60ef1352ebd93 Mon Sep 17 00:00:00 2001 From: zmtzawqlp Date: Wed, 3 Jan 2024 13:42:19 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dreadme=E9=9D=99=E6=80=81?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=20Signed-off-by:=20zmtzawqlp=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- packages/flutter_tools/lib/src/ohos/hvigor.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d8bb40500c..b95bb41c6e 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Flutter SDK 仓库 4. 配置签名 - 你可以通过下面 2 种方式中任意一种对应用进行签名。 + 可以通过下面任意一种方式对应用进行签名。 (1) 使用 `Deveco Studio` 签名 diff --git a/packages/flutter_tools/lib/src/ohos/hvigor.dart b/packages/flutter_tools/lib/src/ohos/hvigor.dart index 84e28fa300..be474e8e5b 100644 --- a/packages/flutter_tools/lib/src/ohos/hvigor.dart +++ b/packages/flutter_tools/lib/src/ohos/hvigor.dart @@ -702,7 +702,7 @@ class OhosHvigorBuilder implements OhosBuilder { 'build/default/outputs/default', 'entry-default-signed.hap'); - final File buildProfile= FlutterProject.current().ohos.getBuildProfileFile(); + final File buildProfile = flutterProject.ohos.getBuildProfileFile(); final String buildProfileConfig = buildProfile.readAsStringSync(); final dynamic obj = JSON5.parse(buildProfileConfig); dynamic signingConfigs = obj['app']?['signingConfigs']; -- Gitee