diff --git a/LICENSE_KHZG b/LICENSE_KHZG
new file mode 100644
index 0000000000000000000000000000000000000000..452a23994b23a7a5f0eb9be33af7058009eed20f
--- /dev/null
+++ b/LICENSE_KHZG
@@ -0,0 +1,21 @@
+Copyright 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the distribution.
+
+ * Neither the name of Hunan OpenValley Digital Industry Development Co., Ltd. nor the names of its contributors may be
+ used to endorse or promote products derived from this software without specific prior written permission.
+
+NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/OAT.xml b/OAT.xml
index ff270e602aace6687e34dcfac7cfc73c5da612c1..aba6944fef17696609bd969f3f2d42acaac7cb7b 100644
--- a/OAT.xml
+++ b/OAT.xml
@@ -52,6 +52,14 @@
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
@@ -82,6 +112,7 @@
+
@@ -104,6 +135,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ install
```
- 方式二:进入项目目录,直接运行安装到鸿蒙手机中
+ 方式二:进入项目目录,直接运行安装到OpenHarmony手机中
```sh
flutter run --debug -d
```
@@ -123,6 +123,7 @@ Flutter SDK 仓库
```
## 版本说明
+ - [3.7.12-ohos-1.0.4 Release](/release-notes/Flutter%203.7.12-ohos%201.0.4%20ReleaseNote.md)
- [3.7.12-ohos-1.0.3 Release](/release-notes/Flutter%203.7.12-ohos%201.0.3%20ReleaseNote.md)
- [3.7.12-ohos-1.0.2 Release](/release-notes/Flutter%203.7.12-ohos%201.0.2%20ReleaseNote.md)
- [3.7.12-ohos-1.0.1 Release](/release-notes/Flutter%203.7.12-ohos%201.0.1%20ReleaseNote.md)
@@ -137,7 +138,7 @@ Flutter SDK 仓库
| create | 创建module模板 | flutter create -t module \ |
| create | 创建plugin模板 | flutter create -t plugin --platforms ohos,android,ios \ |
| create | 创建plugin_ffi模板 | flutter create -t plugin_ffi --platforms ohos,android,ios \ |
-| devices | 已连接设备查找 | flutter devices |
+| devices | 查找已连接设备 | flutter devices |
| install | 应用安装 | flutter install -t \ \ |
| assemble | 资源打包 | flutter assemble |
| build | 测试应用构建 | flutter build hap --debug [--target-platform ohos-arm64] |
@@ -149,28 +150,26 @@ Flutter SDK 仓库
| clean | 清除项目依赖 | flutter clean |
| cache | 清除全局缓存数据 | flutter pub cache clean |
-附:[Flutter高频使用的三方库(部分鸿蒙化)列表](https://gitee.com/openharmony-sig/flutter_packages#openharmony%E5%B9%B3%E5%8F%B0%E5%B7%B2%E5%85%BC%E5%AE%B9%E5%BA%93)
-
+附:[Flutter高频使用的三方库(部分OpenHarmony化)列表](https://gitee.com/openharmony-sig/flutter_packages#openharmony%E5%B9%B3%E5%8F%B0%E5%B7%B2%E5%85%BC%E5%AE%B9%E5%BA%93)
## 常见问题
1. 模拟器调试只支持Mac(arm64),还不支持Mac(x86) 和 Windows。
-2. 切换FLUTTER_STORAGE_BASE_URL后需删除\/bin/cache 目录,并在项目中执行flutter clean后再运行
+2. 切换FLUTTER_STORAGE_BASE_URL后需删除\/bin/cache 目录,并在项目中执行flutter clean后再运行。
3. 构建Hap任务时报错:Error: The hvigor depends on the npmrc file. Configure the npmrc file first.
- 请在用户目录`~`下创建文件`.npmrc`,该配置也可参考[DevEco Studio官方文档](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/environment_config-0000001052902427-V3),编辑内容如下:
+ 请在用户目录`~`下创建文件`.npmrc`,该配置也可参考[DevEco Studio官方文档](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-environment-config-V5#section197296441787),编辑内容如下:
```
registry=https://repo.huaweicloud.com/repository/npm/
@ohos:registry=https://repo.harmonyos.com/npm/
```
-4. 查日志时,存在日志丢失现象。
- 解决方案:关闭全局日志,只打开自己领域的日志
-
+4. 查日志时,存在日志丢失现象。
+ 解决方案:关闭全局日志,只打开自己领域的日志。
```
步骤一:关闭所有领域的日志打印(部分特殊日志无法关闭)
hdc shell hilog -b X
@@ -181,20 +180,21 @@ Flutter SDK 仓库
打印A00000/XComFlutterOHOS_Native的日志,需要设置hdc shell hilog -b D -D A00000
注:上面的设置在机器重启后会失效,如果要继续使用,需要重新设置。
```
-5. 若Api11 Beta1版本的机器上无法启动debug签名的应用,可以通过将签名换成正式签名,或在手机端打开开发者模式解决(步骤:设置->通用->开发者模式)
-6. 如果报`Invalid CEN header (invalid zip64 extra data field size)`异常,请更换Jdk版本,参见[JDK-8313765](https://bugs.openjdk.org/browse/JDK-8313765)
+5. 若Beta1版本的机器上无法启动debug签名的应用,可以通过将签名换成正式签名,或在手机端打开开发者模式解决(步骤:设置->通用->开发者模式)。
+
+6. 如果报`Invalid CEN header (invalid zip64 extra data field size)`异常,请更换Jdk版本。参见[JDK-8313765](https://bugs.openjdk.org/browse/JDK-8313765)
-7. 运行debug版本的flutter应用用到鸿蒙设备后报错(release和profile版本正常)
+7. 运行debug版本的flutter应用用到OpenHarmony设备后报错(release和profile版本正常)。
1. 报错信息: `Error while initializing the Dart VM: Wrong full snapshot version, expected '8af474944053df1f0a3be6e6165fa7cf' found 'adb4292f3ec25074ca70abcd2d5c7251'`
- 2. 解决方案: 依次执行以下操作
+ 2. 解决方案: 依次执行以下操作。
1. 设置环境变量 `export FLUTTER_STORAGE_BASE_URL=https://flutter-ohos.obs.cn-south-1.myhuaweicloud.com`
2. 删除 /bin/cache 目录下的缓存
3. 执行 `flutter clean`,清除项目编译缓存
4. 运行 `flutter run -d $DEVICE --debug`
- 3. 补充信息: 运行android或ios出现类似错误,也可以尝试还原环境变量 FLUTTER_STORAGE_BASE_URL ,清除缓存后重新运行。
+ 3. 补充信息: 若运行android或ios也出现类似错误,可以尝试还原环境变量`FLUTTER_STORAGE_BASE_URL`,清除缓存后重新运行。
-8. Beta2版本的ROM更新后,不再支持申请有执行权限的匿名内存,导致debug运行闪退。
+8. ROM更新后,不再支持申请有执行权限的匿名内存,导致debug运行闪退。
1. 解决方案:更新 flutter_flutter 到 a44b8a6d (2024-07-25) 之后的版本。
2. 关键日志:
@@ -206,14 +206,14 @@ Flutter SDK 仓库
9. 构建Hap命令直接执行`flutter build hap`即可,不再需要`--local-engine`参数,直接从云端获取编译产物。
-10. 配置环境完成后执行 flutter 命令 出现闪退。
- 1. 解决方案:windows环境中添加git环境变量配置。
+10. 配置环境完成后执行 flutter 命令 出现闪退。
+ 解决方案:windows环境中添加git环境变量配置。
```
export PATH=/cmd:$PATH
```
-11. 执行`flutter pub cache clean` 正常 执行`flutter clean` 报错,按照报错信息执行 update 命令也没有效果。
- 1. 解决方案:通过注释掉 build.json5 文件中的配置规避: "modules":[{ // 删除报错对应的整个对象 }]
+11. 执行`flutter pub cache clean` 正常,执行`flutter clean` 报错,按照报错信息执行 update 命令也没有效果。
+ 1. 解决方案:通过注释掉 build.json5 文件中的配置规避: "modules":[{ // 删除报错对应的整个对象 }]。
2. 报错信息:
```
#Parse ohos module. json5 error: Exception: Can not found module.json5 at
@@ -224,9 +224,7 @@ Flutter SDK 仓库
```
12. 执行`flutter build hap` 时遇到路径校验报错。
- 1. 解决方案:
- ·打开 deveco 安装路径 D:\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\res\schemas 下的 ohos-project-build-profile-schema.json文件。
- ·在该文件中找到包含:"pattern": "^(\\./|\\.\\./)[\\s\\S]+$"的行,并删除此行。
+ 1. 解决方案:打开 deveco 安装路径 D:\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\res\schemas 下的 ohos-project-build-profile-schema.json文件。在该文件中找到包含:"pattern": "^(\\./|\\.\\./)[\\s\\S]+$"的行,并删除此行。
2. 报错信息:
```
#hvigor ERROR: Schema validate failed.
@@ -239,15 +237,14 @@ Flutter SDK 仓库
```
13. 执行`flutter build hap` 报错。
- 1. 解决方案:打开 deveco 安装路径 D:\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\src\model\module 下的 core-module-model-impl.js,
- 修改 findBelongProjectPath 方法(需要管理员权限,可另存为后替换)
- ```
- findBelongProjectPath(e) {
- if (e === path_1.default.dirname(e)) {
- return this.parentProject.getProjectDir()
- }
- }
- ```
+ 1. 解决方案:打开 deveco 安装路径 D:\DevEco Studio\tools\hvigor\hvigor-ohos-plugin\src\model\module 下的 core-module-model-impl.js,修改 findBelongProjectPath 方法(需要管理员权限,可另存为后替换)。
+ ```
+ findBelongProjectPath(e) {
+ if (e === path_1.default.dirname(e)) {
+ return this.parentProject.getProjectDir()
+ }
+ }
+ ```
2. 报错信息:
```
# hvigor ERROR: Cannot find belonging project path for module at D:\.
@@ -259,8 +256,8 @@ Flutter SDK 仓库
```
14. 在.ohos的项目执行`flutter clean` 报错,然后再执行`flutter pub get`也报错。
- 1. 解决方案:删除.ohos文件夹,重新flutter pub get 即可
- 2.报错信息:
+ 1. 解决方案:删除.ohos文件夹,重新flutter pub get 即可。
+ 2. 报错信息:
```
Oops; flutter has exited unexpectedly: "PathNotFoundException: Cannot open file, path = 'D:\code\.ohos\build-profile.json5' (OS Error: 系统找不到指定的文件。,error = 2)".
A crash report has been written to D:\code\flutter_01.log.
diff --git a/app_build/.gitignore b/app_build/.gitignore
index a43bd6fdf33d4a44861805c5c23884b8f6a07cb5..4e5ab5126b32fdd43b4c015cf9dc24ec9aaa20c0 100644
--- a/app_build/.gitignore
+++ b/app_build/.gitignore
@@ -1,15 +1,3 @@
-# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
debug_out
release_out
diff --git a/app_build/__init__.py b/app_build/__init__.py
index 8a0d2b732fd4262728df4467a0c9aac5504dcda8..5513928de6a1f0e843b7302b2f7edb84bfcc4b8f 100644
--- a/app_build/__init__.py
+++ b/app_build/__init__.py
@@ -1,12 +1,3 @@
-# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE_KHZG file.
diff --git a/app_build/build_dill.py b/app_build/build_dill.py
index a26e6cfaea05cf77540a7dfcfd8a7c774b1b5479..24af312de320ed28e6eed5180eecc79f42e7dde4 100644
--- a/app_build/build_dill.py
+++ b/app_build/build_dill.py
@@ -1,15 +1,6 @@
-# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE_KHZG file.
#!/usr/bin/python
import excute_util
diff --git a/app_build/config.py b/app_build/config.py
index 322241ac8b977f39f4725579c8057b414c02a2d7..2c4a3661366a6b9900086277770783cf252a7480 100644
--- a/app_build/config.py
+++ b/app_build/config.py
@@ -1,15 +1,6 @@
-# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE_KHZG file.
#!/usr/bin/python
import sys
diff --git a/app_build/debug.py b/app_build/debug.py
index 350ae37213fb6df12b65084c02762d092514909d..66db44c7cd37a4939095ea8dd3bb9ef018021f9a 100644
--- a/app_build/debug.py
+++ b/app_build/debug.py
@@ -1,15 +1,6 @@
-# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE_KHZG file.
#!/usr/bin/python
import file_util
diff --git a/app_build/env_util.py b/app_build/env_util.py
index 8fbc139d88828ee3a9f7c2f2e53a709da7b5015a..0a62ad92d1b0e1e420aa1d739643c09627cdaa88 100644
--- a/app_build/env_util.py
+++ b/app_build/env_util.py
@@ -1,15 +1,6 @@
-# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE_KHZG file.
#!/usr/bin/python
import os
diff --git a/app_build/excute_util.py b/app_build/excute_util.py
index 6dbd2898334f64fb1a7276261ed10ee8f0d64160..f2221de74b7cf5f25ba9f59aa681cce58d9073db 100644
--- a/app_build/excute_util.py
+++ b/app_build/excute_util.py
@@ -1,15 +1,6 @@
-# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE_KHZG file.
import subprocess
from datetime import datetime
diff --git a/app_build/file_util.py b/app_build/file_util.py
index 0189665f0657a9a43d5f70d1b3c04c3cb41e19a4..d51a82478b5500f2f3c00a7df2c0363e5ec0521b 100644
--- a/app_build/file_util.py
+++ b/app_build/file_util.py
@@ -1,15 +1,6 @@
-# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE_KHZG file.
#!/usr/bin/python
import shutil
diff --git a/app_build/release.py b/app_build/release.py
index 62427c3eee1d6315993686e2e84a8c4bb84b56a2..6241064c3cfec327940661304c7c70fee626186f 100644
--- a/app_build/release.py
+++ b/app_build/release.py
@@ -1,15 +1,6 @@
-# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE_KHZG file.
#!/usr/bin/python
import config
diff --git a/bin/internal/engine.ohos.version b/bin/internal/engine.ohos.version
index f08b3e435ed18e71dcf587ecac314be24dd103fb..5cbc1885ab6bb8c9364d1103ae047972d37e7792 100644
--- a/bin/internal/engine.ohos.version
+++ b/bin/internal/engine.ohos.version
@@ -1 +1 @@
-e10bd6ac40602bd7b2410561b71c035a5cf7c931
+a9e521ff880033ab7bfecc6903da552483a506e1
\ No newline at end of file
diff --git a/bin/internal/shared.bat b/bin/internal/shared.bat
index 26fea942199a60517e4f448257e946d794cf5bb9..8f1e38b0e126e1dc5a32976644ede7b2dcc060ca 100644
--- a/bin/internal/shared.bat
+++ b/bin/internal/shared.bat
@@ -21,7 +21,7 @@ SET stamp_path=%cache_dir%\flutter_tools.stamp
SET script_path=%flutter_tools_dir%\bin\flutter_tools.dart
SET dart_sdk_path=%cache_dir%\dart-sdk
SET engine_stamp=%cache_dir%\engine-dart-sdk.stamp
-SET engine_version_path=%FLUTTER_ROOT%\bin\internal\engine.version
+SET engine_version_path=%FLUTTER_ROOT%\bin\internal\engine.ohos.version
SET pub_cache_path=%FLUTTER_ROOT%\.pub-cache
SET dart=%dart_sdk_path%\bin\dart.exe
diff --git a/bin/internal/update_dart_sdk.ps1 b/bin/internal/update_dart_sdk.ps1
index f4e2e77a55886435e4fe753a93913ab589f9ba06..ebca4a4b02e93f85b03ef3dfe49ce2e24c377c9c 100644
--- a/bin/internal/update_dart_sdk.ps1
+++ b/bin/internal/update_dart_sdk.ps1
@@ -19,7 +19,9 @@ $flutterRoot = (Get-Item $progName).parent.parent.FullName
$cachePath = "$flutterRoot\bin\cache"
$dartSdkPath = "$cachePath\dart-sdk"
$engineStamp = "$cachePath\engine-dart-sdk.stamp"
-$engineVersion = (Get-Content "$flutterRoot\bin\internal\engine.version")
+$engineVersionFile = "engine.ohos.version"
+
+$engineVersion = (Get-Content "$flutterRoot\bin\internal\$engineVersionFile")
$oldDartSdkPrefix = "dart-sdk.old"
@@ -38,13 +40,30 @@ if ((Test-Path $engineStamp) -and ($engineVersion -eq (Get-Content $engineStamp)
return
}
-$dartSdkBaseUrl = $Env:FLUTTER_STORAGE_BASE_URL
+$dartSdkBaseUrl = $Env:FLUTTER_OHOS_STORAGE_BASE_URL
if (-not $dartSdkBaseUrl) {
- $dartSdkBaseUrl = "https://storage.googleapis.com"
+ $dartSdkBaseUrl = "https://flutter-ohos.obs.cn-south-1.myhuaweicloud.com"
+}
+if($Env:FLUTTER_OHOS_STORAGE_BASE_URL) {
+ $dartSdkBaseUrl = $Env:FLUTTER_OHOS_STORAGE_BASE_URL
+}
+# It's important to use the native Dart SDK as the default target architecture
+# for Flutter Windows builds depend on the Dart executable's architecture.
+$dartZipNameX64 = "dart-sdk-windows-x64.zip"
+$dartZipNameArm64 = "dart-sdk-windows-arm64.zip"
+$dartZipName = $dartZipNameX64
+if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") {
+ $dartSdkArm64Url = "$dartSdkBaseUrl/flutter_infra_release/flutter/$engineVersion/$dartZipNameArm64"
+ Try {
+ Invoke-WebRequest -Uri $dartSdkArm64Url -UseBasicParsing -Method Head | Out-Null
+ $dartZipName = $dartZipNameArm64
+ }
+ Catch {
+ Write-Host "The current channel's Dart SDK does not support Windows Arm64, falling back to Windows x64..."
+ }
}
-$dartZipName = "dart-sdk-windows-x64.zip"
$dartSdkUrl = "$dartSdkBaseUrl/flutter_infra_release/flutter/$engineVersion/$dartZipName"
-
+Write-Host "dart-sdk-url: $dartSdkUrl"
if (Test-Path $dartSdkPath) {
# Move old SDK to a new location instead of deleting it in case it is still in use (e.g. by IntelliJ).
$oldDartSdkSuffix = 1
diff --git a/bin/internal/update_dart_sdk.sh b/bin/internal/update_dart_sdk.sh
index 49e4698a824ec24d0fc85963b32ef468ebd635b0..2224a8f9e139ed8171c3439f72debb8fc6a224c5 100755
--- a/bin/internal/update_dart_sdk.sh
+++ b/bin/internal/update_dart_sdk.sh
@@ -16,10 +16,13 @@ set -e
FLUTTER_ROOT="$(dirname "$(dirname "$(dirname "${BASH_SOURCE[0]}")")")"
+ENGINE_VERSION_FILE="engine.ohos.version"
+FLUTTER_OHOS_STORAGE_BASE_URL=${FLUTTER_OHOS_STORAGE_BASE_URL:-https://flutter-ohos.obs.cn-south-1.myhuaweicloud.com}
+
DART_SDK_PATH="$FLUTTER_ROOT/bin/cache/dart-sdk"
DART_SDK_PATH_OLD="$DART_SDK_PATH.old"
ENGINE_STAMP="$FLUTTER_ROOT/bin/cache/engine-dart-sdk.stamp"
-ENGINE_VERSION=`cat "$FLUTTER_ROOT/bin/internal/engine.version"`
+ENGINE_VERSION=$(cat "$FLUTTER_ROOT/bin/internal/$ENGINE_VERSION_FILE")
OS="$(uname -s)"
if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; then
@@ -121,9 +124,10 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; t
FIND=find
fi
- DART_SDK_BASE_URL="${FLUTTER_STORAGE_BASE_URL:-https://storage.googleapis.com}"
+ DART_SDK_BASE_URL="${FLUTTER_OHOS_STORAGE_BASE_URL:-https://storage.googleapis.com}"
DART_SDK_URL="$DART_SDK_BASE_URL/flutter_infra_release/flutter/$ENGINE_VERSION/$DART_ZIP_NAME"
+ echo 'dart-sdk-url:' $DART_SDK_URL
# if the sdk path exists, copy it to a temporary location
if [ -d "$DART_SDK_PATH" ]; then
rm -rf "$DART_SDK_PATH_OLD"
diff --git a/dev/benchmarks/complex_layout/ohos/build-profile.json5 b/dev/benchmarks/complex_layout/ohos/build-profile.json5
index 7ceb22efeed38e0b25be0cfd650fe207601f3f98..8938b90e0f88570574f7f041cb62ba7a05a99cbe 100644
--- a/dev/benchmarks/complex_layout/ohos/build-profile.json5
+++ b/dev/benchmarks/complex_layout/ohos/build-profile.json5
@@ -1,18 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
{
"app": {
"signingConfigs": [],
diff --git a/dev/benchmarks/complex_layout/ohos/entry/build-profile.json5 b/dev/benchmarks/complex_layout/ohos/entry/build-profile.json5
index 633d360fbc91a3186a23b66ab71b27e5618944cb..6de31ee2243926392c90c572c00a052f7c3fa9e9 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/build-profile.json5
+++ b/dev/benchmarks/complex_layout/ohos/entry/build-profile.json5
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
{
"apiType": 'stageMode',
diff --git a/dev/benchmarks/complex_layout/ohos/entry/hvigorfile.ts b/dev/benchmarks/complex_layout/ohos/entry/hvigorfile.ts
index 894fc15c6b793f085e6c8506e43d719af658e8ff..bcd2cf7dc3f09ff7395b6c4a28ebf853b202b47f 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/hvigorfile.ts
+++ b/dev/benchmarks/complex_layout/ohos/entry/hvigorfile.ts
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
export { hapTasks } from '@ohos/hvigor-ohos-plugin';
diff --git a/dev/benchmarks/complex_layout/ohos/entry/oh-package.json5 b/dev/benchmarks/complex_layout/ohos/entry/oh-package.json5
index dabaee13151003854589516fcfb20ccd29c44b6b..80aa77e3db589d937f763c963eed4b07aaa6bc0f 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/oh-package.json5
+++ b/dev/benchmarks/complex_layout/ohos/entry/oh-package.json5
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
{
"name": "entry",
diff --git a/dev/benchmarks/complex_layout/ohos/entry/src/main/ets/entryability/EntryAbility.ets b/dev/benchmarks/complex_layout/ohos/entry/src/main/ets/entryability/EntryAbility.ets
index 8bc48be8773196f34cccb15cf517f87f5c6b94d2..f85a65508a6140721404097998b77be622c93d5d 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/src/main/ets/entryability/EntryAbility.ets
+++ b/dev/benchmarks/complex_layout/ohos/entry/src/main/ets/entryability/EntryAbility.ets
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
import { FlutterAbility, FlutterEngine } from '@ohos/flutter_ohos';
import { GeneratedPluginRegistrant } from '../plugins/GeneratedPluginRegistrant';
diff --git a/dev/benchmarks/complex_layout/ohos/entry/src/main/ets/pages/Index.ets b/dev/benchmarks/complex_layout/ohos/entry/src/main/ets/pages/Index.ets
index 1125f9fdd95f4310a182c1c9e3680f37f73686c9..f888d06192a925ff7898e3c71bf606566cf48dbe 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/src/main/ets/pages/Index.ets
+++ b/dev/benchmarks/complex_layout/ohos/entry/src/main/ets/pages/Index.ets
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
import common from '@ohos.app.ability.common';
import { FlutterPage } from '@ohos/flutter_ohos'
diff --git a/dev/benchmarks/complex_layout/ohos/entry/src/main/module.json5 b/dev/benchmarks/complex_layout/ohos/entry/src/main/module.json5
index 7bbf78b18f39991b1404061c7437538c7d532bb7..5bd7950ba5343abd89b475921bca8bbbacd3629c 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/src/main/module.json5
+++ b/dev/benchmarks/complex_layout/ohos/entry/src/main/module.json5
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
{
"module": {
"name": "entry",
diff --git a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/test/Ability.test.ets b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/test/Ability.test.ets
index 25d4c71ff3cd584f5d64f6f8c0ac864928c234c4..8abf7f2f44c0e56110df8c09b2524a4ca37bc993 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/test/Ability.test.ets
+++ b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -1,18 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
import hilog from '@ohos.hilog';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
diff --git a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/test/List.test.ets b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/test/List.test.ets
index f4140030e65d20df6af30a6bf51e464dea8f8aa6..d766fe249dfc3ada636f27e64d9b64451ce32c93 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/test/List.test.ets
+++ b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/test/List.test.ets
@@ -1,18 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
import abilityTest from './Ability.test'
export default function testsuite() {
diff --git a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets
index 4ca645e6013cfce8e7dbb728313cb8840c4da660..42fcf69c986ba971f56b56f4b568aacf06ef298e 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets
+++ b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
import UIAbility from '@ohos.app.ability.UIAbility';
import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
diff --git a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets
index cef0447cd2f137ef82d223ead2e156808878ab90..6466fb9197899170b34d93bae6e253a1a40c2fb6 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets
+++ b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
import hilog from '@ohos.hilog';
diff --git a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
index 1def08f2e9dcbfa3454a07b7a3b82b173bb90d02..47fc89b4f05bf2efc6e863b8c2569705a4c56fd9 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
+++ b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
import hilog from '@ohos.hilog';
import TestRunner from '@ohos.application.testRunner';
diff --git a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/module.json5 b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/module.json5
index fab77ce2e0c61e3ad010bab5b27ccbd15f9a8c96..e29411f46a136a52a32edee668aa58201ff6d607 100644
--- a/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/module.json5
+++ b/dev/benchmarks/complex_layout/ohos/entry/src/ohosTest/module.json5
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
{
"module": {
diff --git a/dev/benchmarks/complex_layout/ohos/hvigor/hvigor-config.json5 b/dev/benchmarks/complex_layout/ohos/hvigor/hvigor-config.json5
index 541ba35711b75986f9295410ee38fdb8f2572878..e7b855ac20e294c76e70350654c16da224ff03b2 100644
--- a/dev/benchmarks/complex_layout/ohos/hvigor/hvigor-config.json5
+++ b/dev/benchmarks/complex_layout/ohos/hvigor/hvigor-config.json5
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
{
"modelVersion": "5.0.0",
diff --git a/dev/benchmarks/complex_layout/ohos/hvigorfile.ts b/dev/benchmarks/complex_layout/ohos/hvigorfile.ts
index 8f2d2aafe6d6a3a71a9944ebd0c91fbc308ac9d1..76cbff657f0ae6b274ddbbd0a938ce86226606d2 100644
--- a/dev/benchmarks/complex_layout/ohos/hvigorfile.ts
+++ b/dev/benchmarks/complex_layout/ohos/hvigorfile.ts
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
import { appTasks } from '@ohos/hvigor-ohos-plugin';
diff --git a/dev/benchmarks/complex_layout/ohos/oh-package.json5 b/dev/benchmarks/complex_layout/ohos/oh-package.json5
index 0547594c0d9fe2de363a80af708744809205c3d1..d0d5dd2e6f43b17cc04ad8924c74e32dbce4763a 100644
--- a/dev/benchmarks/complex_layout/ohos/oh-package.json5
+++ b/dev/benchmarks/complex_layout/ohos/oh-package.json5
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
{
"modelVersion": "5.0.0",
diff --git a/dev/benchmarks/macrobenchmarks/ohos/build-profile.json5 b/dev/benchmarks/macrobenchmarks/ohos/build-profile.json5
index 5fcb3dc466ec0efe97a15ac93a397ddcc0ec6c56..e7ef02284e3ac5e0e0b641abd16dc79436d3e596 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/build-profile.json5
+++ b/dev/benchmarks/macrobenchmarks/ohos/build-profile.json5
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
{
"app": {
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/build-profile.json5 b/dev/benchmarks/macrobenchmarks/ohos/entry/build-profile.json5
index 633d360fbc91a3186a23b66ab71b27e5618944cb..11a8dca6f9a51bac8daa912bab79b35c7be848a2 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/build-profile.json5
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/build-profile.json5
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
{
"apiType": 'stageMode',
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/hvigorfile.ts b/dev/benchmarks/macrobenchmarks/ohos/entry/hvigorfile.ts
index 894fc15c6b793f085e6c8506e43d719af658e8ff..bcd2cf7dc3f09ff7395b6c4a28ebf853b202b47f 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/hvigorfile.ts
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/hvigorfile.ts
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
export { hapTasks } from '@ohos/hvigor-ohos-plugin';
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/oh-package.json5 b/dev/benchmarks/macrobenchmarks/ohos/entry/oh-package.json5
index dabaee13151003854589516fcfb20ccd29c44b6b..ecce1057f9598ebd83b18f6772f24e3c6324291c 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/oh-package.json5
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/oh-package.json5
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
{
"name": "entry",
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/ets/entryability/EntryAbility.ets b/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/ets/entryability/EntryAbility.ets
index 8bc48be8773196f34cccb15cf517f87f5c6b94d2..efc4c75dafc527c923eb3e9f3ae105ad1dd6aadc 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/ets/entryability/EntryAbility.ets
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/ets/entryability/EntryAbility.ets
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
import { FlutterAbility, FlutterEngine } from '@ohos/flutter_ohos';
import { GeneratedPluginRegistrant } from '../plugins/GeneratedPluginRegistrant';
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/ets/pages/Index.ets b/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/ets/pages/Index.ets
index 1125f9fdd95f4310a182c1c9e3680f37f73686c9..f888d06192a925ff7898e3c71bf606566cf48dbe 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/ets/pages/Index.ets
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/ets/pages/Index.ets
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
import common from '@ohos.app.ability.common';
import { FlutterPage } from '@ohos/flutter_ohos'
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/module.json5 b/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/module.json5
index 7bbf78b18f39991b1404061c7437538c7d532bb7..5bd7950ba5343abd89b475921bca8bbbacd3629c 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/module.json5
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/src/main/module.json5
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
{
"module": {
"name": "entry",
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/test/Ability.test.ets b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/test/Ability.test.ets
index 25d4c71ff3cd584f5d64f6f8c0ac864928c234c4..fefeb6ea18753265ef72446ee9309e0a15835e66 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/test/Ability.test.ets
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
import hilog from '@ohos.hilog';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/test/List.test.ets b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/test/List.test.ets
index f4140030e65d20df6af30a6bf51e464dea8f8aa6..348ab4ea9ee3e33ad3709db8258ddca670c65563 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/test/List.test.ets
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/test/List.test.ets
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
import abilityTest from './Ability.test'
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets
index 4ca645e6013cfce8e7dbb728313cb8840c4da660..42fcf69c986ba971f56b56f4b568aacf06ef298e 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
import UIAbility from '@ohos.app.ability.UIAbility';
import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets
index cef0447cd2f137ef82d223ead2e156808878ab90..545843d3949e383b7bdd6ebbf5681d28c3e6ef71 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
import hilog from '@ohos.hilog';
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
index 1def08f2e9dcbfa3454a07b7a3b82b173bb90d02..47fc89b4f05bf2efc6e863b8c2569705a4c56fd9 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
@@ -1,17 +1,3 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
import hilog from '@ohos.hilog';
import TestRunner from '@ohos.application.testRunner';
diff --git a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/module.json5 b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/module.json5
index fab77ce2e0c61e3ad010bab5b27ccbd15f9a8c96..e29411f46a136a52a32edee668aa58201ff6d607 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/module.json5
+++ b/dev/benchmarks/macrobenchmarks/ohos/entry/src/ohosTest/module.json5
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
{
"module": {
diff --git a/dev/benchmarks/macrobenchmarks/ohos/hvigor/hvigor-config.json5 b/dev/benchmarks/macrobenchmarks/ohos/hvigor/hvigor-config.json5
index 541ba35711b75986f9295410ee38fdb8f2572878..0e35b0d60fe1513bad527182753ef509ea321783 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/hvigor/hvigor-config.json5
+++ b/dev/benchmarks/macrobenchmarks/ohos/hvigor/hvigor-config.json5
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
{
"modelVersion": "5.0.0",
diff --git a/dev/benchmarks/macrobenchmarks/ohos/hvigorfile.ts b/dev/benchmarks/macrobenchmarks/ohos/hvigorfile.ts
index 8f2d2aafe6d6a3a71a9944ebd0c91fbc308ac9d1..76cbff657f0ae6b274ddbbd0a938ce86226606d2 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/hvigorfile.ts
+++ b/dev/benchmarks/macrobenchmarks/ohos/hvigorfile.ts
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
import { appTasks } from '@ohos/hvigor-ohos-plugin';
diff --git a/dev/benchmarks/macrobenchmarks/ohos/oh-package.json5 b/dev/benchmarks/macrobenchmarks/ohos/oh-package.json5
index c640999ec2753fcc36c68f3ac72342b35278a71d..c341a8f271c4043cde0fc151ed6d6a66dd267e91 100644
--- a/dev/benchmarks/macrobenchmarks/ohos/oh-package.json5
+++ b/dev/benchmarks/macrobenchmarks/ohos/oh-package.json5
@@ -1,17 +1,4 @@
-/*
-* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+
{
"modelVersion": "5.0.0",
diff --git a/packages/flutter/lib/src/scheduler/binding.dart b/packages/flutter/lib/src/scheduler/binding.dart
index 8820c7cf04121dfa94735ade14ca78d47f0ce35e..919da31e7802aceaac81cbef16b62723d0a89ea0 100644
--- a/packages/flutter/lib/src/scheduler/binding.dart
+++ b/packages/flutter/lib/src/scheduler/binding.dart
@@ -9,6 +9,7 @@ import 'dart:ui' show AppLifecycleState, DartPerformanceMode, FramePhase, FrameT
import 'package:collection/collection.dart' show HeapPriorityQueue, PriorityQueue;
import 'package:flutter/foundation.dart';
+import 'package:flutter/services.dart';
import 'debug.dart';
import 'priority.dart';
@@ -1310,6 +1311,12 @@ mixin SchedulerBinding on BindingBase {
return true;
}());
}
+
+ void setDVsyncSwitch(bool isEnable) {
+ if (defaultTargetPlatform == TargetPlatform.ohos) {
+ SystemChannels.nativeVsync.send({"isEnable": isEnable});
+ }
+ }
}
/// The default [SchedulingStrategy] for [SchedulerBinding.schedulingStrategy].
diff --git a/packages/flutter/lib/src/services/raw_keyboard_ohos.dart b/packages/flutter/lib/src/services/raw_keyboard_ohos.dart
index b54201d0a626235b6285b1b578c0bbb50932dd18..9c6ff843a365ccb5a55b8ff32ab8e019c9f18ab0 100644
--- a/packages/flutter/lib/src/services/raw_keyboard_ohos.dart
+++ b/packages/flutter/lib/src/services/raw_keyboard_ohos.dart
@@ -1,16 +1,7 @@
/*
-* Copyright (c) 2024 Hunan OpenValley Digital Industry Development Co., Ltd.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
+* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. All rights reserved.
+* Use of this source code is governed by a BSD-style license that can be
+* found in the LICENSE_KHZG file.
*/
import 'keyboard_maps.g.dart';
diff --git a/packages/flutter/lib/src/services/system_channels.dart b/packages/flutter/lib/src/services/system_channels.dart
index c69c7e5e77d026093d5b27d5ae9efcd05b6a7195..13531d3fb1a4298dbe7f5badd37fdd216015b42f 100644
--- a/packages/flutter/lib/src/services/system_channels.dart
+++ b/packages/flutter/lib/src/services/system_channels.dart
@@ -465,4 +465,9 @@ class SystemChannels {
///
/// * [DefaultPlatformMenuDelegate], which uses this channel.
static const MethodChannel menu = OptionalMethodChannel('flutter/menu');
+
+ static const BasicMessageChannel