Skip to content

Commit 3b59790

Browse files
committed
迁移到 JitPack 仓库
1 parent 184242c commit 3b59790

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,26 @@
66

77
* 已投入公司项目多时,没有任何毛病,可胜任任何需求,[点击此处下载Demo](ToastUtils.apk)
88

9-
![](ToastUtils.gif)
10-
11-
#### 本框架意在解决一些常见需求,如果是有一些特殊的需求推荐配搭 [XToast](https://github.com/getActivity/XToast) 悬浮窗使用
9+
![](ToastUtils.jpg)
1210

1311
#### 集成步骤
1412

13+
* 在项目根目录下的 `build.gradle` 文件中加入
14+
15+
```groovy
16+
buildscript {
17+
......
18+
}
19+
allprojects {
20+
repositories {
21+
// JitPack 远程仓库:https://jitpack.io
22+
maven { url 'https://jitpack.io' }
23+
}
24+
}
25+
```
26+
27+
* 在项目 app 模块下的 `build.gradle` 文件中加入
28+
1529
```groovy
1630
android {
1731
// 支持 JDK 1.8
@@ -23,11 +37,11 @@ android {
2337
2438
dependencies {
2539
// 吐司框架:https://github.com/getActivity/ToastUtils
26-
implementation 'com.hjq:toast:9.0'
40+
implementation 'com.github.getActivity:ToastUtils:9.0'
2741
}
2842
```
2943

30-
#### 初始化
44+
#### 初始化框架
3145

3246
```java
3347
ToastUtils.init(this);
@@ -42,7 +56,6 @@ ToastUtils.show("我是吐司");
4256
#### 取消 Toast
4357

4458
```java
45-
// 取消 Toast 显示
4659
ToastUtils.cancel();
4760
```
4861

@@ -131,6 +144,8 @@ Toast.makeText
131144
new Toast
132145
```
133146

147+
#### 温馨提示:框架意在解决一些常规的 Toast 需求,如果是有一些特殊的定制化需求请配搭 [XToast](https://github.com/getActivity/XToast) 悬浮窗框架使用
148+
134149
#### 作者的其他开源项目
135150

136151
* 安卓技术中台:[AndroidProject](https://github.com/getActivity/AndroidProject)

ToastUtils.gif

-1.32 MB
Binary file not shown.

ToastUtils.jpg

91.3 KB
Loading

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ buildscript {
77
}
88
dependencies {
99
classpath 'com.android.tools.build:gradle:3.4.0'
10-
classpath 'com.novoda:bintray-release:0.9.2'
1110
}
1211
}
1312

library/build.gradle

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'com.novoda.bintray-release'
32

43
android {
54
compileSdkVersion 30
@@ -17,15 +16,6 @@ android {
1716
}
1817
}
1918

20-
publish {
21-
userOrg = 'getactivity'
22-
groupId = 'com.hjq'
23-
artifactId = 'toast'
24-
publishVersion = '9.0'
25-
desc = 'This is a very functional Toast'
26-
website = "https://github.com/getActivity/ToastUtils"
27-
}
28-
2919
tasks.withType(Javadoc) {
3020
options.addStringOption('Xdoclint:none', '-quiet')
3121
options.addStringOption('encoding', 'UTF-8')

0 commit comments

Comments
 (0)