diff --git a/demo/BUILD.gn b/demo/BUILD.gn old mode 100644 new mode 100755 diff --git a/demo/hjsunit_sample/BUILD.gn b/demo/hjsunit_sample/BUILD.gn old mode 100644 new mode 100755 index bb33162e7aa049ed07d0868135b095526ff7287a..e2ed3b544bba1eaa88033c3e099ee4aa3231565e --- a/demo/hjsunit_sample/BUILD.gn +++ b/demo/hjsunit_sample/BUILD.gn @@ -10,9 +10,27 @@ # 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("//test/xts/tools/build/suite.gni") +import("//test/xts/tools/build/suite.gni") ohos_js_hap_suite("hjs_demo_test") { - test_hap_name = "Hjsdemotest" - hap_source_path = "hap/entry-debug-signed.hap" + hap_profile = "./src/main/config.json" + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] +# shared_libraries = [ + # "//third_party/giflib:libgif", +# "//third_party/libpng:libpng", +# ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "Hjsdemotest" +# part_name = "prebuilt_hap" +# subsystem_name = "xts" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" } diff --git a/demo/hjsunit_sample/Test.json b/demo/hjsunit_sample/Test.json old mode 100644 new mode 100755 diff --git a/demo/hjsunit_sample/entry/package.json b/demo/hjsunit_sample/entry/package.json deleted file mode 100644 index 69a88e3b65423624fe7ea8b0f8beefcc62cc3d5f..0000000000000000000000000000000000000000 --- a/demo/hjsunit_sample/entry/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/demo/hjsunit_sample/hap/entry-debug-signed.hap b/demo/hjsunit_sample/hap/entry-debug-signed.hap deleted file mode 100644 index 76b7653122e4d2e26c18bffa99b0a360c8aeda4d..0000000000000000000000000000000000000000 Binary files a/demo/hjsunit_sample/hap/entry-debug-signed.hap and /dev/null differ diff --git a/demo/hjsunit_sample/signature/openharmony_sx.p7b b/demo/hjsunit_sample/signature/openharmony_sx.p7b new file mode 100755 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/demo/hjsunit_sample/signature/openharmony_sx.p7b differ diff --git a/demo/hjsunit_sample/entry/src/main/config.json b/demo/hjsunit_sample/src/main/config.json old mode 100644 new mode 100755 similarity index 98% rename from demo/hjsunit_sample/entry/src/main/config.json rename to demo/hjsunit_sample/src/main/config.json index 69e91f6f3c092c58389896b409b26353ccf442f1..9889c145cf45093c6b938d34bb050c555653f09e --- a/demo/hjsunit_sample/entry/src/main/config.json +++ b/demo/hjsunit_sample/src/main/config.json @@ -8,7 +8,7 @@ }, "apiVersion": { "compatible": 4, - "target": 4 + "target": 5 } }, "deviceConfig": {}, diff --git a/demo/hjsunit_sample/entry/src/main/js/default/app.js b/demo/hjsunit_sample/src/main/js/default/app.js old mode 100644 new mode 100755 similarity index 100% rename from demo/hjsunit_sample/entry/src/main/js/default/app.js rename to demo/hjsunit_sample/src/main/js/default/app.js diff --git a/demo/hjsunit_sample/entry/src/main/js/default/i18n/en-US.json b/demo/hjsunit_sample/src/main/js/default/i18n/en-US.json old mode 100644 new mode 100755 similarity index 100% rename from demo/hjsunit_sample/entry/src/main/js/default/i18n/en-US.json rename to demo/hjsunit_sample/src/main/js/default/i18n/en-US.json diff --git a/demo/hjsunit_sample/entry/src/main/js/default/i18n/zh-CN.json b/demo/hjsunit_sample/src/main/js/default/i18n/zh-CN.json old mode 100644 new mode 100755 similarity index 100% rename from demo/hjsunit_sample/entry/src/main/js/default/i18n/zh-CN.json rename to demo/hjsunit_sample/src/main/js/default/i18n/zh-CN.json diff --git a/demo/hjsunit_sample/src/main/js/default/pages/index/index.css b/demo/hjsunit_sample/src/main/js/default/pages/index/index.css new file mode 100755 index 0000000000000000000000000000000000000000..caf729946975b79e55ab9e56e55bf860337b3f50 --- /dev/null +++ b/demo/hjsunit_sample/src/main/js/default/pages/index/index.css @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2021 Huawei Device 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. + */ + +.container { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + left: 0px; + top: 0px; + width: 100%; + height: 100%; +} + +.title { + font-size: 60px; + text-align: center; + width: 100%; + height: 40%; + margin: 10px; +} +.btn { + width: 50%; + height: 100px; + font-size: 40px; +} diff --git a/demo/hjsunit_sample/src/main/js/default/pages/index/index.hml b/demo/hjsunit_sample/src/main/js/default/pages/index/index.hml new file mode 100755 index 0000000000000000000000000000000000000000..61ea59d936e5a2971f1ea3d179c44a7f3f596c54 --- /dev/null +++ b/demo/hjsunit_sample/src/main/js/default/pages/index/index.hml @@ -0,0 +1,21 @@ + + +