diff --git a/.gitignore b/.gitignore index 37a4eb8b43d978ea05b2c6e3fb934f9b40dddd4d..f1f83f4d886c82e621880d4ae1d8636517011e8d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ .externalNativeBuild /entry/.preview .cxx +upload.gradle diff --git a/README.md b/README.md index 49c15124170dd79b790427978fd0e10aaec59820..0e37bc2f3c9c9a788721f56302ca8f060f8ce925 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 bbb5d8b3bebfa3a7c406747c636f6dc51ab06748..fb21feb8b3723c780bb53cd32d843cb6ebf42b6c 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 67cd261741204de0a856d752f989bf6b9206109a..23ab2a8ec48ca75391794cd0ee307bd96e2f35e3 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 {