From b2cb4c3b6b4410c731bf09376c1c45423420dd0d Mon Sep 17 00:00:00 2001 From: xujianhong Date: Fri, 21 May 2021 17:43:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9README=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.OPENSOURCE | 19 +++++++++ build.gradle | 2 +- entry/build.gradle | 4 +- entry/src/main/config.json | 6 +-- entry/src/ohosTest/config.json | 41 +++++++++++++++++++ .../ohoskun/xtablayout/ExampleOhosTest.java | 38 +++++++++++++++++ .../java/com/ufreedom/demo/ExampleTest.java | 6 +++ 7 files changed, 111 insertions(+), 5 deletions(-) create mode 100644 README.OPENSOURCE create mode 100644 entry/src/ohosTest/config.json create mode 100644 entry/src/ohosTest/java/com/ohoskun/xtablayout/ExampleOhosTest.java diff --git a/README.OPENSOURCE b/README.OPENSOURCE new file mode 100644 index 0000000..cde771a --- /dev/null +++ b/README.OPENSOURCE @@ -0,0 +1,19 @@ +[ + + { + + "Name": "FloatingView", + + "License": "Apache License", + + "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/build.gradle b/build.gradle index 9097118..de2db9e 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 079cbf6..3ac9abb 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 bd7e0de..9c884ee 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 0000000..785e1f5 --- /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 0000000..dcee51a --- /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 ef0261b..1920e18 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() { } -- Gitee From e19b0a118ecd5979f7b8634a61d67a39987446f9 Mon Sep 17 00:00:00 2001 From: xujianhong Date: Mon, 24 May 2021 17:39:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?README=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.OPENSOURCE | 2 +- README.md | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.OPENSOURCE b/README.OPENSOURCE index cde771a..3a1ec01 100644 --- a/README.OPENSOURCE +++ b/README.OPENSOURCE @@ -4,7 +4,7 @@ "Name": "FloatingView", - "License": "Apache License", + "License": "Apache License 2.0", "License File": "https://github.com/UFreedom/FloatingView/blob/master/LICENSE.txt", diff --git a/README.md b/README.md index fd80161..a313733 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 #### 效果演示 -- Gitee From be817db91153973f09e190586b25abf407508184 Mon Sep 17 00:00:00 2001 From: xujianhong Date: Mon, 24 May 2021 17:47:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?README=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/java/com/ufreedom/floatingview/ExampleTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FloatingViewLib/src/test/java/com/ufreedom/floatingview/ExampleTest.java b/FloatingViewLib/src/test/java/com/ufreedom/floatingview/ExampleTest.java index a909378..aa6cb47 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() { } -- Gitee