diff --git a/FloatingViewLib/src/test/java/com/ufreedom/floatingview/ExampleTest.java b/FloatingViewLib/src/test/java/com/ufreedom/floatingview/ExampleTest.java index a909378c34244b8309a3ec6eaf560e21acba3dda..aa6cb4785dc1f5d372aa099f85d924cbef153da1 100644 --- a/FloatingViewLib/src/test/java/com/ufreedom/floatingview/ExampleTest.java +++ b/FloatingViewLib/src/test/java/com/ufreedom/floatingview/ExampleTest.java @@ -2,7 +2,13 @@ package com.ufreedom.floatingview; import org.junit.Test; +/** + * ExampleTest + */ public class ExampleTest { + /** + * onStart + */ @Test public void onStart() { } diff --git a/README.OPENSOURCE b/README.OPENSOURCE new file mode 100644 index 0000000000000000000000000000000000000000..3a1ec01613c072076a94f16900b8bfcdbe988901 --- /dev/null +++ b/README.OPENSOURCE @@ -0,0 +1,19 @@ +[ + + { + + "Name": "FloatingView", + + "License": "Apache License 2.0", + + "License File": "https://github.com/UFreedom/FloatingView/blob/master/LICENSE.txt", + + "Version Number": "1.0.2", + + "Upstream URL": "https://github.com/UFreedom/FloatingView.git", + + "Description": "可以让view在别的view上执行的漂浮动画" + + } + +] \ No newline at end of file diff --git a/README.md b/README.md index fd8016184d68bb531a60ad37f2045c3d5944d524..a31373300e35a5ae032df6a68a7170eb4218e7d1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # FloatingView -**本项目基于开源项目FloatingView进行openharmony化的移植和开发,可以通过项目标签以及github地址( https://github.com/UFreedom/FloatingView )追踪到原安卓项目版本** - #### 项目介绍 - 项目名称:FloatingView - 所属系列:openharmony的第三方组件适配移植 @@ -10,7 +8,6 @@ - 调用差异:有 - 基线版本:release 1.0.2 - 开发版本:sdk5,DevEco Studio2.1 beta3 -- 原项目Doc地址:https://github.com/UFreedom/FloatingView #### 效果演示 diff --git a/build.gradle b/build.gradle index 9097118df06bf21081277518b0bbb0f5c1a2d129..de2db9e182e3af984fc629b3bd2556aa436c51db 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ buildscript { } dependencies { classpath 'com.huawei.ohos:hap:2.4.2.7' - classpath 'com.huawei.ohos:decctest:1.0.0.6' + classpath 'com.huawei.ohos:decctest:1.0.0.7' } } diff --git a/entry/build.gradle b/entry/build.gradle index 079cbf69c9e83e6db7ea4e11e809c75887a7d590..3ac9abb4f0214a5b933cb5bb0a33bbc6eb0dab2f 100644 --- a/entry/build.gradle +++ b/entry/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.huawei.ohos.hap' +apply plugin: 'com.huawei.ohos.decctest' ohos { compileSdkVersion 5 defaultConfig { @@ -8,6 +9,7 @@ ohos { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) - testCompile 'junit:junit:4.12' + testImplementation 'junit:junit:4.13' + ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.100' implementation('com.gitee.chinasoft_ohos:FloatingView:0.0.1-SNAPSHOT') } diff --git a/entry/src/main/config.json b/entry/src/main/config.json index bd7e0de19800bc0cfadc9e84a278f23df588ee4f..9c884ee6d12584dc0c83de1f285ddfd973608a83 100644 --- a/entry/src/main/config.json +++ b/entry/src/main/config.json @@ -3,11 +3,11 @@ "bundleName": "com.ufreedom.demo", "vendor": "ufreedom", "version": { - "code": 1, - "name": "1.0" + "code": 1000000, + "name": "1.0.0" }, "apiVersion": { - "compatible": 4, + "compatible": 5, "target": 5, "releaseType": "Release" } diff --git a/entry/src/ohosTest/config.json b/entry/src/ohosTest/config.json new file mode 100644 index 0000000000000000000000000000000000000000..785e1f5d28573264ba68a3a9cd7f54bb2c3d5534 --- /dev/null +++ b/entry/src/ohosTest/config.json @@ -0,0 +1,41 @@ +{ + "app": { + "bundleName": "com.ufreedom.demo", + "vendor": "ufreedom", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Release" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.ufreedom.demo", + "name": "testModule", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry_test", + "moduleType": "feature", + "installationFree": true + }, + "abilities": [ + { + "name": "decc.testkit.runner.EntryAbility", + "description": "Test Entry Ability", + "icon": "$media:icon", + "label": "FloatingView", + "launchType": "standard", + "orientation": "landscape", + "visible": true, + "type": "page" + } + ] + } +} \ No newline at end of file diff --git a/entry/src/ohosTest/java/com/ohoskun/xtablayout/ExampleOhosTest.java b/entry/src/ohosTest/java/com/ohoskun/xtablayout/ExampleOhosTest.java new file mode 100644 index 0000000000000000000000000000000000000000..dcee51a3369bdb29c005008385ce0a3d3c23d3b0 --- /dev/null +++ b/entry/src/ohosTest/java/com/ohoskun/xtablayout/ExampleOhosTest.java @@ -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 an 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. + */ + +package com.ohoskun.xtablayout; + +import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +/** + * ExampleOhosTest + * + * @author xjh + * @since 2021-04-21 + */ +public class ExampleOhosTest { + /** + * testBundleName + */ + @Test + public void testBundleName() { + final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName(); + assertEquals("com.ufreedom.demo", actualBundleName); + } +} \ No newline at end of file diff --git a/entry/src/test/java/com/ufreedom/demo/ExampleTest.java b/entry/src/test/java/com/ufreedom/demo/ExampleTest.java index ef0261b5aecdabef479f98eb4af432dfdaf7c7e7..1920e18739d52350b5798f38d552ee5eaf6cc39b 100644 --- a/entry/src/test/java/com/ufreedom/demo/ExampleTest.java +++ b/entry/src/test/java/com/ufreedom/demo/ExampleTest.java @@ -2,7 +2,13 @@ package com.ufreedom.demo; import org.junit.Test; +/** + * ExampleTest + */ public class ExampleTest { + /** + * onStart + */ @Test public void onStart() { }