From f98a63e7c1f569b53710a3dfafbc5ddaf917de08 Mon Sep 17 00:00:00 2001 From: zxd191990 <1713664308@qq.com> Date: Thu, 15 Apr 2021 14:13:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + README.md | 27 ++++++++++++++++----------- build.gradle | 6 +++++- library/build.gradle | 8 ++++++++ 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 37a4eb8..f1f83f4 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ .externalNativeBuild /entry/.preview .cxx +upload.gradle diff --git a/README.md b/README.md index 49c1512..0e37bc2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ExpandableTextView -**本项目基于开源项目ExpandableTextView 进行OpenHarmony化的移植和开发,可以通过项目标签以及github地址()追踪到原安卓项目版本** +**本项目基于开源项目ExpandableTextView 进行OpenHarmony的移植和开发,可以通过项目标签以及github地址()追踪到原安卓项目版本** #### 项目介绍 - 项目名称:可以展开/折叠的Text @@ -19,18 +19,23 @@ #### 安装教程 -1.下载library的har包library.har(位于:)。 - -2.启动 DevEco Studio,将下载的har包,导入工程目录“demo->libs”下。 - -3.在moudle级别下的build.gradle文件中添加依赖,在dependencies标签中增加对libs目录下jar包的引用。 - +1.在项目根目录下的build.gradle文件中, + ```gradle +allprojects { + repositories { + maven { + url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' + } + } +} ``` +2.在entry模块的build.gradle文件中, + ```gradle dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) - ...... + implementation('com.gitee.chinasoft_ohos:ExpandableTextView:0.0.1-SNAPSHOT') + ...... } - ``` + 如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, 并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下 @@ -114,7 +119,7 @@ CloudTest代码测试无异常 #### 版本迭代 -- v0.0.1_alpha +- 0.0.1-SNAPSHOT #### 版权和许可信息 diff --git a/build.gradle b/build.gradle index bbb5d8b..fb21feb 100644 --- a/build.gradle +++ b/build.gradle @@ -32,6 +32,10 @@ allprojects { maven { url 'https://developer.huawei.com/repo/' } - jcenter() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' + } + + jcenter() } } diff --git a/library/build.gradle b/library/build.gradle index 67cd261..23ab2a8 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,4 +1,12 @@ apply plugin: 'com.huawei.ohos.library' +apply from: '../upload.gradle' + +rootProject.ext { + DEFAULT_GROUP_ID = 'com.gitee.chinasoft_ohos' + DEFAULT_ARTIFACT_ID = "ExpandableTextView" + DEFAULT_VERSION = '0.0.1-SNAPSHOT' +} + ohos { compileSdkVersion 5 defaultConfig { -- Gitee