From 2d2b1074dd4bf9ce5f52f0befc051d18d7d0e0ce Mon Sep 17 00:00:00 2001 From: dirk41 <1378902882@qq.com> Date: Fri, 21 May 2021 16:26:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?README=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++---- LICENSE | 21 +++++++++++++++++++ README.OPENSOURCE | 10 +++++++++ README.md | 6 ------ build.gradle | 3 +++ entry/build.gradle | 2 ++ .../webviewcodedemo/ShowAbility.java | 4 ++-- .../resources/base/layout/ability_show.xml | 4 ++-- .../protectsoft/webviewcode/HighlightLib.java | 2 +- .../com/protectsoft/webviewcode/Settings.java | 4 ++-- 10 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 LICENSE create mode 100644 README.OPENSOURCE diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c6df91..95492e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,3 @@ ## 0.0.1-SNAPSHOT -* refactor: For module library Android-to-OpenHarmony - -## 2 -* 2 \ No newline at end of file +* 第一次提交 +* 主要功能:高亮代码块 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6b992bf --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Avraam Piperidis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.OPENSOURCE b/README.OPENSOURCE new file mode 100644 index 0000000..79a2b33 --- /dev/null +++ b/README.OPENSOURCE @@ -0,0 +1,10 @@ +[ + { + "Name": " Codeview ", + "License": " MIT License ", + "License File": " LICENSE ", + "Version Number": " 2 ", + "Upstream URL": " https://github.wuyanzheshui.workers.dev/avraampiperidis/Codeview ", + "Description": " Codeview is a ohos library tha lets you preview code in webview very easy and simple with highlighs and colors. With styles to chooses and language." + } +] diff --git a/README.md b/README.md index 1594dfd..3a50059 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,7 @@ - 项目移植状态:完成 - 调用差异:无 - 开发版本:sdk5,DevEco Studio2.1 Beta4 -- 项目作者和维护人:蒋军 -- 联系方式:jiangjun073@chinasoftinc.com -- 原项目Doc地址:https://github.com/avraampiperidis/Codeview - 基线版本:Codeview组件 Release 2 -- 编程语言:Java #### 效果演示 @@ -133,8 +129,6 @@ CloudTest代码测试无异常 当前版本demo功能与原组件基本无差异 -测试员:李文琪 - #### 版本迭代 - 0.0.1-SNAPSHOT diff --git a/build.gradle b/build.gradle index 1dc510f..64ddd89 100644 --- a/build.gradle +++ b/build.gradle @@ -31,6 +31,9 @@ allprojects { } maven { url 'https://developer.huawei.com/repo/' + } + maven { + url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } jcenter() } diff --git a/entry/build.gradle b/entry/build.gradle index 45bbf69..ac00f24 100644 --- a/entry/build.gradle +++ b/entry/build.gradle @@ -21,6 +21,8 @@ dependencies { implementation project(path: ':library') testImplementation 'junit:junit:4.13' ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.100' + testImplementation 'org.mockito:mockito-core:2.23.0' + testImplementation 'com.google.truth:truth:0.39' } decc { supportType = ['html', 'xml'] diff --git a/entry/src/main/java/com/protectsoft/webviewcodedemo/ShowAbility.java b/entry/src/main/java/com/protectsoft/webviewcodedemo/ShowAbility.java index c4d51af..c7a29fc 100644 --- a/entry/src/main/java/com/protectsoft/webviewcodedemo/ShowAbility.java +++ b/entry/src/main/java/com/protectsoft/webviewcodedemo/ShowAbility.java @@ -35,7 +35,7 @@ public class ShowAbility extends Ability { private static final int NUM_20 = 20; private final int[] resIds = { ResourceTable.Id_btn_default,ResourceTable.Id_btn_agate, - ResourceTable.Id_btn_ANDROIDSTUDIO,ResourceTable.Id_btn_ARDUINO_LIGHT,ResourceTable.Id_btn_ARTA, + ResourceTable.Id_btn_OHOSSTUDIO,ResourceTable.Id_btn_ARDUINO_LIGHT,ResourceTable.Id_btn_ARTA, ResourceTable.Id_btn_ASCETIC,ResourceTable.Id_btn_ATELIER_DARK,ResourceTable.Id_btn_ATELIER_LIGHT, ResourceTable.Id_btn_ATELIER_FOREST_DARK,ResourceTable.Id_btn_DARKSTYLE, ResourceTable.Id_btn_DARKULA,ResourceTable.Id_btn_DOCCO,ResourceTable.Id_btn_FAR, @@ -44,7 +44,7 @@ public class ShowAbility extends Ability { ResourceTable.Id_btn_OBSIDIAN,ResourceTable.Id_btn_XCODE}; private final String[] styles = { Settings.WithStyle.DEFAULT,Settings.WithStyle.AGATE, - Settings.WithStyle.ANDROIDSTUDIO,Settings.WithStyle.ARDUINO_LIGHT,Settings.WithStyle.ARTA, + Settings.WithStyle.OHOSSTUDIO,Settings.WithStyle.ARDUINO_LIGHT,Settings.WithStyle.ARTA, Settings.WithStyle.ASCETIC,Settings.WithStyle.ATELIER_DARK, Settings.WithStyle.ATELIER_LIGHT,Settings.WithStyle.ATELIER_FOREST_DARK,Settings.WithStyle.DARKSTYLE, Settings.WithStyle.DARKULA,Settings.WithStyle.DOCCO, diff --git a/entry/src/main/resources/base/layout/ability_show.xml b/entry/src/main/resources/base/layout/ability_show.xml index 69bc209..1006b8c 100644 --- a/entry/src/main/resources/base/layout/ability_show.xml +++ b/entry/src/main/resources/base/layout/ability_show.xml @@ -39,13 +39,13 @@ ohos:weight="1"/>