-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update plugin structure for OpenHarmony (#301)
- Loading branch information
Showing
44 changed files
with
52 additions
and
781 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
packages/flutter_image_compress/example/ohos/entry/oh-package.json5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
name: 'entry', | ||
version: '1.0.0', | ||
description: 'Please describe the basic information.', | ||
main: '', | ||
author: '', | ||
license: '', | ||
dependencies: { | ||
'@ohos/path_provider_ohos': 'file:./har/path_provider_ohos.har', | ||
'@ohos/flutter_image_compress_ohos': 'file:./har/flutter_image_compress_ohos.har', | ||
}, | ||
"name": "entry", | ||
"version": "1.0.0", | ||
"description": "Please describe the basic information.", | ||
"main": "", | ||
"author": "", | ||
"license": "", | ||
"dependencies": { | ||
"path_provider_ohos": "file:../har/path_provider_ohos.har", | ||
"flutter_image_compress_ohos": "file:../har/flutter_image_compress_ohos.har" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 19 additions & 9 deletions
28
...tter_image_compress/example/ohos/entry/src/main/ets/plugins/GeneratedPluginRegistrant.ets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
import { FlutterPlugin } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; | ||
import List from '@ohos.util.List'; | ||
import FlutterImageCompressOhosPlugin from '@ohos/flutter_image_compress_ohos' | ||
import PathProviderPlugin from '@ohos/path_provider_ohos' | ||
import { FlutterEngine, Log } from '@ohos/flutter_ohos'; | ||
import FlutterImageCompressOhosPlugin from 'flutter_image_compress_ohos'; | ||
import PathProviderPlugin from 'path_provider_ohos'; | ||
|
||
/** | ||
* Generated file. Do not edit. | ||
* This file is generated by the Flutter tool based on the | ||
* plugins that support the Ohos platform. | ||
*/ | ||
|
||
const TAG = "GeneratedPluginRegistrant"; | ||
|
||
export class GeneratedPluginRegistrant { | ||
static getPlugins(): List<FlutterPlugin> { | ||
let pluginList : List<FlutterPlugin> = new List(); | ||
pluginList.add(new FlutterImageCompressOhosPlugin()); | ||
pluginList.add(new PathProviderPlugin()); | ||
return pluginList; | ||
|
||
static registerWith(flutterEngine: FlutterEngine) { | ||
try { | ||
flutterEngine.getPlugins()?.add(new FlutterImageCompressOhosPlugin()); | ||
flutterEngine.getPlugins()?.add(new PathProviderPlugin()); | ||
} catch (e) { | ||
Log.e( | ||
TAG, | ||
"Tried to register plugins with FlutterEngine (" | ||
+ flutterEngine | ||
+ ") failed."); | ||
Log.e(TAG, "Received exception while registering", e); | ||
} | ||
} | ||
} |
50 changes: 0 additions & 50 deletions
50
packages/flutter_image_compress/example/ohos/entry/src/ohosTest/ets/test/Ability.test.ets
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
packages/flutter_image_compress/example/ohos/entry/src/ohosTest/ets/test/List.test.ets
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
...es/flutter_image_compress/example/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
...es/flutter_image_compress/example/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets
This file was deleted.
Oops, something went wrong.
64 changes: 0 additions & 64 deletions
64
...er_image_compress/example/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.