From 20778e1119a1429c6909b4b41341dac981c2f05a Mon Sep 17 00:00:00 2001 From: yeliulee Date: Fri, 18 Oct 2024 13:46:06 +0800 Subject: [PATCH] add missing main prop and exclude unnecessary files Signed-off-by: yeliulee --- ohos/.gitignore | 20 +++++++++++++++----- ohos/BuildProfile.ets | 17 ----------------- ohos/build-profile.json5 | 21 --------------------- ohos/oh-package-lock.json5 | 17 ----------------- ohos/oh-package.json5 | 4 ++-- 5 files changed, 17 insertions(+), 62 deletions(-) delete mode 100644 ohos/BuildProfile.ets delete mode 100644 ohos/oh-package-lock.json5 diff --git a/ohos/.gitignore b/ohos/.gitignore index e85c394..6f7b4f8 100644 --- a/ohos/.gitignore +++ b/ohos/.gitignore @@ -1,7 +1,17 @@ /node_modules /oh_modules -/.preview -/build -/.cxx -/.test -flutter_embedding.har \ No newline at end of file +/local.properties +/.idea +**/build +/.hvigor +.cxx +/.clangd +/.clang-format +/.clang-tidy +**/.test + +/entry/libs/arm64-v8a/libflutter.so +/entry/src/main/resources/rawfile/flutter_assets +**.har +**/oh-package-lock.json5 +BuildProfile.ets diff --git a/ohos/BuildProfile.ets b/ohos/BuildProfile.ets deleted file mode 100644 index 3a501e5..0000000 --- a/ohos/BuildProfile.ets +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Use these variables when you tailor your ArkTS code. They must be of the const type. - */ -export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; -export const TARGET_NAME = 'default'; - -/** - * BuildProfile Class is used only for compatibility purposes. - */ -export default class BuildProfile { - static readonly HAR_VERSION = HAR_VERSION; - static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; - static readonly DEBUG = DEBUG; - static readonly TARGET_NAME = TARGET_NAME; -} \ No newline at end of file diff --git a/ohos/build-profile.json5 b/ohos/build-profile.json5 index 662fdc7..dca58bd 100644 --- a/ohos/build-profile.json5 +++ b/ohos/build-profile.json5 @@ -15,31 +15,10 @@ { "apiType": "stageMode", "buildOption": { - "arkOptions": { - // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ - } }, - "buildOptionSet": [ - { - "name": "release", - "arkOptions": { - "obfuscation": { - "ruleOptions": { - "enable": true, - "files": [ - "./obfuscation-rules.txt" - ] - } - } - } - }, - ], "targets": [ { "name": "default" - }, - { - "name": "ohosTest", } ] } \ No newline at end of file diff --git a/ohos/oh-package-lock.json5 b/ohos/oh-package-lock.json5 deleted file mode 100644 index b9a8790..0000000 --- a/ohos/oh-package-lock.json5 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "meta": { - "stableOrder": false - }, - "lockfileVersion": 3, - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", - "specifiers": { - "@ohos/flutter_ohos@../example/ohos/har/flutter.har": "@ohos/flutter_ohos@../example/ohos/har/flutter.har" - }, - "packages": { - "@ohos/flutter_ohos@../example/ohos/har/flutter.har": { - "name": "flutter", - "resolved": "../example/ohos/har/flutter.har", - "registryType": "local" - } - } -} \ No newline at end of file diff --git a/ohos/oh-package.json5 b/ohos/oh-package.json5 index 9235e6f..392d35f 100644 --- a/ohos/oh-package.json5 +++ b/ohos/oh-package.json5 @@ -2,10 +2,10 @@ "name": "mobile_scanner", "version": "1.0.0", "description": "Please describe the basic information.", - "main": "", + "main": "index.ets", "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/flutter_ohos": "file:har/flutter.har" + "@ohos/flutter_ohos": "file:libs/flutter.har" } } \ No newline at end of file -- Gitee