diff --git a/README.en.md b/README.en.md index 114ad9ac675a27b547426601528f9a3f0cdc022d..940df5da97c6c3efa1670807370ade7f4cd65972 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 7f294dbd41ad9064066021b0558f0675562ac179..e6fd92bdbde30ce3e4ad2c2da6b54a57b301aad9 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/packages/flutter_tools/lib/src/ohos/ohos_plugins_manager.dart b/packages/flutter_tools/lib/src/ohos/ohos_plugins_manager.dart index e4e8e2ddf57b3699a964bf7ac1f81b890b1c2867..0a89fe2dd6c1de1d0b04f9aafa7a190d9d7d772f 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'\', '/'); +} 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 0000000000000000000000000000000000000000..2f3e32ba385f70bbb005a3319fa87bbe875ac940 --- /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 0000000000000000000000000000000000000000..89a2c11a573e05175bbb6d287f3e9102a54911bb --- /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