From f1692a55aeff9758713c805b7174209be82a38d0 Mon Sep 17 00:00:00 2001 From: hezhengyi Date: Sun, 25 Aug 2024 09:32:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9ohos=E5=B7=A5=E7=A8=8B?= =?UTF-8?q?=E7=BA=A7=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=97=B6=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hezhengyi --- .../lib/src/ohos/ohos_plugins_manager.dart | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/flutter_tools/lib/src/ohos/ohos_plugins_manager.dart b/packages/flutter_tools/lib/src/ohos/ohos_plugins_manager.dart index e4e8e2ddf5..0a89fe2dd6 100644 --- a/packages/flutter_tools/lib/src/ohos/ohos_plugins_manager.dart +++ b/packages/flutter_tools/lib/src/ohos/ohos_plugins_manager.dart @@ -51,7 +51,7 @@ Future checkOhosPluginsDependencies(FlutterProject flutterProject) async { if (flutterProject.isModule) { dependencies[plugin.name] = 'file:$absolutePath'; } else { - final String relativePath = globals.fs.path.relative(absolutePath, from: globals.fs.path.dirname(packageFile.path)); + final String relativePath = _relative(absolutePath, from: globals.fs.path.dirname(packageFile.path)); dependencies[plugin.name] = 'file:$relativePath'; } } @@ -86,13 +86,14 @@ Future addPluginsModules(FlutterProject flutterProject) async { } modules.add({ 'name': plugin.name, - 'srcPath': globals.fs.path.join(plugin.path, OhosPlugin.kConfigKey), + 'srcPath': _relative( + globals.fs.path.join(plugin.path, OhosPlugin.kConfigKey), + from: flutterProject.ohos.ohosRoot.path, + ), 'targets': >[ { 'name': 'default', - 'applyToProducts': [ - 'default' - ] + 'applyToProducts': ['default'] } ], }); @@ -119,9 +120,12 @@ Future addFlutterModuleAndPluginsSrcOverrides(FlutterProject flutterProjec final Map overrides = config['overrides'] as Map? ?? {}; for (final Plugin plugin in plugins) { - overrides[plugin.name] = globals.fs.path.join(plugin.path, OhosPlugin.kConfigKey); + overrides[plugin.name] = _relative( + globals.fs.path.join(plugin.path, OhosPlugin.kConfigKey), + from: flutterProject.ohos.ohosRoot.path, + ); } - final String relativePath = globals.fs.path.relative(flutterProject.ohos.flutterModuleDirectory.path, from: flutterProject.ohos.ohosRoot.path); + final String relativePath = _relative(flutterProject.ohos.flutterModuleDirectory.path, from: flutterProject.ohos.ohosRoot.path); overrides['@ohos/flutter_module'] = 'file:./$relativePath'; overrides['@ohos/flutter_ohos'] = 'file:./har/flutter.har'; final String configNew = const JsonEncoder.withIndent(' ').convert(config); @@ -189,3 +193,7 @@ Future addFlutterModuleAndPluginsOverrides(FlutterProject flutterProject) final String configNew = const JsonEncoder.withIndent(' ').convert(config); packageFile.writeAsStringSync(configNew, flush: true); } + +String _relative(String path, {String? from}) { + return globals.fs.path.relative(path, from: from).replaceAll(r'\', '/'); +} -- Gitee From 02bd97062d868573dd496af68103adbdfaef0258 Mon Sep 17 00:00:00 2001 From: mfzhong <279822581@qq.com> Date: Thu, 29 Aug 2024 09:52:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mfzhong <279822581@qq.com> --- README.en.md | 3 +- README.md | 2 + ...lutter 3.7.12-ohos 1.0.0 ReleaseNote.en.md | 87 +++++++++++++++++++ .../Flutter 3.7.12-ohos 1.0.0 ReleaseNote.md | 87 +++++++++++++++++++ 4 files changed, 178 insertions(+), 1 deletion(-) create mode 100644 release-notes/Flutter 3.7.12-ohos 1.0.0 ReleaseNote.en.md create mode 100644 release-notes/Flutter 3.7.12-ohos 1.0.0 ReleaseNote.md diff --git a/README.en.md b/README.en.md index 114ad9ac67..940df5da97 100644 --- a/README.en.md +++ b/README.en.md @@ -101,7 +101,8 @@ This repository is a compatible extension of Flutter SDK for the OpenHarmony pla # Example: flutter build app --release [--local-engine=/src/out/ohos_release_arm64] local-engine(is optional) flutter build app --release ``` - +## ReleaseNotes + [3.7.12-ohos-1.0.0 Release](/release-notes/Flutter%203.7.12-ohos%201.0.0%20ReleaseNote.en.md) ## Compatible command list developed by OpenHarmony diff --git a/README.md b/README.md index 7f294dbd41..e6fd92bdbd 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,8 @@ Flutter SDK 仓库 flutter build app --release ``` +## 版本说明 + [3.7.12-ohos-1.0.0 Release](/release-notes/Flutter%203.7.12-ohos%201.0.0%20ReleaseNote.md) ## 已兼容OpenHarmony开发的指令列表 | 指令名称 | 指令描述 | 使用说明 | diff --git a/release-notes/Flutter 3.7.12-ohos 1.0.0 ReleaseNote.en.md b/release-notes/Flutter 3.7.12-ohos 1.0.0 ReleaseNote.en.md new file mode 100644 index 0000000000..2f3e32ba38 --- /dev/null +++ b/release-notes/Flutter 3.7.12-ohos 1.0.0 ReleaseNote.en.md @@ -0,0 +1,87 @@ +## Version Overview +This version is the Flutter OpenHarmony platform version 1.0.0, based on the Flutter 3.7.12. This version supports and improves the capabilities of the OpenHarmony platform, provides platform-based channels, external texture, cloud SDKs and other features, and optimizes performance. + +## Release scope +HarmonyOS NEXT, API12 + +## New features +- Support OpenHarmony platform Flutter Channel +- Support OpenHarmony platform Flutter Engine +- Support OpenHarmony platform Flutter Command line tool +- Support OpenHarmony platform External Texture +- Support OpenHarmony platform SDK +- Official library & Third-party library OpenHarmony platform adaptation + +## Release time +August 28, 2024 + +## Version Mapping +- ROM: 205.0.0.61(SP1C00E63R4P9) / NEXT.0.0.61(SP1C00E63R4P9) +- IDE: DevEco Studio 5.0.3.706 +- SDK: HarmonyOS SDK 5.0.0.61(SP1), API12 +- Flutter SDK: 3.7.12-ohos-1.0.0 + +## Development Documentation + +- [Document](https://gitee.com/openharmony-sig/flutter_samples/tree/master/ohos/docs) + +## Third-party library list +- Official library: + + [Official library](https://gitee.com/openharmony-sig/flutter_packages) + +- Third-party library: + + | Third-party library name | Warehouse address | + |:----|:----| + |sqflite|https://gitee.com/openharmony-sig/flutter_sqflite| + |permission_handler|https://gitee.com/openharmony-sig/flutter_permission_handler| + |fluttertoast|https://gitee.com/openharmony-sig/flutter_fluttertoast| + |connectivity_plus|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |device_info_plus|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |package_info_plus|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |connectivity|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |package_info|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |audio_session|https://gitee.com/openharmony-sig/flutter_audio_session/| + |flutter_native_image|https://gitee.com/openharmony-sig/flutter_native_image| + |flutter_sound|https://gitee.com/openharmony-sig/flutter_sound| + |image_gallery_saver|https://gitee.com/openharmony-sig/flutter_image_gallery_saver| + |location|https://gitee.com/openharmony-sig/flutter_location| + |power_image|https://gitee.com/openharmony-sig/flutter_power_image| + |share_plus|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |wakelock|https://gitee.com/openharmony-sig/flutter_wakelock| + |flutter_console|https://gitee.com/openharmony-sig/flutter_console| + |audioplayers|https://gitee.com/openharmony-sig/flutter_audioplayers| + |gpu_image|https://gitee.com/openharmony-sig/flutter_gpu_image| + |image_crop|https://gitee.com/openharmony-sig/flutter_image_crop| + |bitmap|https://gitee.com/openharmony-sig/flutter_bitmap| + |leak_detector|https://gitee.com/openharmony-sig/flutter_leak_detector| + |flutter_math_fork|https://gitee.com/openharmony-sig/flutter_math_fork| + |flutter_contacts|https://gitee.com/openharmony-sig/flutter_contacts| + |flutter_inappwebview|https://gitee.com/openharmony-sig/flutter_inappwebview| + |flutter_keyboard_visibility|https://gitee.com/openharmony-sig/flutter_keyboard_visibility| + |flutter_widget_from_html|https://gitee.com/openharmony-sig/flutter_widget_from_html| + |mobile_scanner|https://gitee.com/openharmony-sig/fluttertpc_mobile_scanner| + |device_util|https://gitee.com/openharmony-sig/fluttertpc_device_util| + |export_video_frame|https://gitee.com/openharmony-sig/fluttertpc_export_video_frame| + |flutter_local_notifications|https://gitee.com/openharmony-sig/fluttertpc_flutter_local_notifications| + |flutter_phone_direct_caller|https://gitee.com/openharmony-sig/fluttertpc_flutter_phone_direct_caller| + |flutter_screenshot_callback|https://gitee.com/openharmony-sig/fluttertpc_screenshot_callback| + |flutter_sms|https://gitee.com/openharmony-sig/fluttertpc_flutter_sms| + |media_info|https://gitee.com/openharmony-sig/fluttertpc_media_info| + |orientation|https://gitee.com/openharmony-sig/fluttertpc_orientation| + |recognition_qrcode|https://gitee.com/openharmony-sig/fluttertpc_recognition_qrcode| + |video_compress|https://gitee.com/openharmony-sig/fluttertpc_video_compress| + |share_extend|https://gitee.com/openharmony-sig/fluttertpc_share_extend| + |catcher|https://gitee.com/openharmony-sig/fluttertpc_catcher| + |flutter_mailer|https://gitee.com/openharmony-sig/fluttertpc_flutter_mailer| + |gallery_saver|https://gitee.com/openharmony-sig/fluttertpc_gallery_saver| + |flutter_localization|https://gitee.com/openharmony-sig/flutter_localization| + |keyboard_actions|https://gitee.com/openharmony-sig/fluttertpc_keyboard_actions| + |native_device_orientation|https://gitee.com/openharmony-sig/fluttertpc_native_device_orientation| + |screen|https://gitee.com/openharmony-sig/fluttertpc_screen| + |pdf_render|https://gitee.com/openharmony-sig/fluttertpc_pdf_render| + + +## Known Issues +- When multiple PlatformViews are mixed with native development, the first PlatformView page will not be updated when opening the second page and returning to the first page. \ No newline at end of file diff --git a/release-notes/Flutter 3.7.12-ohos 1.0.0 ReleaseNote.md b/release-notes/Flutter 3.7.12-ohos 1.0.0 ReleaseNote.md new file mode 100644 index 0000000000..89a2c11a57 --- /dev/null +++ b/release-notes/Flutter 3.7.12-ohos 1.0.0 ReleaseNote.md @@ -0,0 +1,87 @@ +## 版本概述 +本版本为Flutter OpenHarmony平台1.0.0版本,基于Flutter 3.7.12版本适配。本版本支持和完善OpenHarmony平台侧能力,提供平台化Channel、外接纹理、云端SDK等特性,并优化性能。 + +## 发布范围 +HarmonyOS NEXT, API12 + +## 新增特性 +- 支持OpenHarmony平台Flutter Channel +- 支持OpenHarmony平台Flutter Engine +- 支持OpenHarmony平台Flutter命令行工具 +- 支持外接纹理 +- 支持云端SDK +- 官方库&三方库OpenHarmony平台适配 + +## 版本发布时间 +2024年8月28日 + +## 版本配套 +- ROM: 205.0.0.61(SP1C00E63R4P9) / NEXT.0.0.61(SP1C00E63R4P9) +- IDE: DevEco Studio 5.0.3.706 +- SDK: HarmonyOS SDK 5.0.0.61(SP1),API12 +- Flutter SDK: 3.7.12-ohos-1.0.0 + +## 赋能文档 + +- [文档链接](https://gitee.com/openharmony-sig/flutter_samples/tree/master/ohos/docs) + +## 三方库列表 +- 官方库: + + [官方库链接](https://gitee.com/openharmony-sig/flutter_packages) + +- 三方库: + + |三方库名称|仓库地址| + |:----|:----| + |sqflite|https://gitee.com/openharmony-sig/flutter_sqflite| + |permission_handler|https://gitee.com/openharmony-sig/flutter_permission_handler| + |fluttertoast|https://gitee.com/openharmony-sig/flutter_fluttertoast| + |connectivity_plus|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |device_info_plus|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |package_info_plus|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |connectivity|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |package_info|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |audio_session|https://gitee.com/openharmony-sig/flutter_audio_session/| + |flutter_native_image|https://gitee.com/openharmony-sig/flutter_native_image| + |flutter_sound|https://gitee.com/openharmony-sig/flutter_sound| + |image_gallery_saver|https://gitee.com/openharmony-sig/flutter_image_gallery_saver| + |location|https://gitee.com/openharmony-sig/flutter_location| + |power_image|https://gitee.com/openharmony-sig/flutter_power_image| + |share_plus|https://gitee.com/openharmony-sig/flutter_plus_plugins| + |wakelock|https://gitee.com/openharmony-sig/flutter_wakelock| + |flutter_console|https://gitee.com/openharmony-sig/flutter_console| + |audioplayers|https://gitee.com/openharmony-sig/flutter_audioplayers| + |gpu_image|https://gitee.com/openharmony-sig/flutter_gpu_image| + |image_crop|https://gitee.com/openharmony-sig/flutter_image_crop| + |bitmap|https://gitee.com/openharmony-sig/flutter_bitmap| + |leak_detector|https://gitee.com/openharmony-sig/flutter_leak_detector| + |flutter_math_fork|https://gitee.com/openharmony-sig/flutter_math_fork| + |flutter_contacts|https://gitee.com/openharmony-sig/flutter_contacts| + |flutter_inappwebview|https://gitee.com/openharmony-sig/flutter_inappwebview| + |flutter_keyboard_visibility|https://gitee.com/openharmony-sig/flutter_keyboard_visibility| + |flutter_widget_from_html|https://gitee.com/openharmony-sig/flutter_widget_from_html| + |mobile_scanner|https://gitee.com/openharmony-sig/fluttertpc_mobile_scanner| + |device_util|https://gitee.com/openharmony-sig/fluttertpc_device_util| + |export_video_frame|https://gitee.com/openharmony-sig/fluttertpc_export_video_frame| + |flutter_local_notifications|https://gitee.com/openharmony-sig/fluttertpc_flutter_local_notifications| + |flutter_phone_direct_caller|https://gitee.com/openharmony-sig/fluttertpc_flutter_phone_direct_caller| + |flutter_screenshot_callback|https://gitee.com/openharmony-sig/fluttertpc_screenshot_callback| + |flutter_sms|https://gitee.com/openharmony-sig/fluttertpc_flutter_sms| + |media_info|https://gitee.com/openharmony-sig/fluttertpc_media_info| + |orientation|https://gitee.com/openharmony-sig/fluttertpc_orientation| + |recognition_qrcode|https://gitee.com/openharmony-sig/fluttertpc_recognition_qrcode| + |video_compress|https://gitee.com/openharmony-sig/fluttertpc_video_compress| + |share_extend|https://gitee.com/openharmony-sig/fluttertpc_share_extend| + |catcher|https://gitee.com/openharmony-sig/fluttertpc_catcher| + |flutter_mailer|https://gitee.com/openharmony-sig/fluttertpc_flutter_mailer| + |gallery_saver|https://gitee.com/openharmony-sig/fluttertpc_gallery_saver| + |flutter_localization|https://gitee.com/openharmony-sig/flutter_localization| + |keyboard_actions|https://gitee.com/openharmony-sig/fluttertpc_keyboard_actions| + |native_device_orientation|https://gitee.com/openharmony-sig/fluttertpc_native_device_orientation| + |screen|https://gitee.com/openharmony-sig/fluttertpc_screen| + |pdf_render|https://gitee.com/openharmony-sig/fluttertpc_pdf_render| + + +## 已知问题 +- 多个PlatformView与原生混合开发时,打开第二个页面返回再返回第一个页面,第一个PlatformView页面不会更新 \ No newline at end of file -- Gitee