Skip to content

Commit 7fa9fcf

Browse files
authored
Merge pull request Blankj#1 from Blankj/master
更新最新
2 parents 00b634c + deb9f5c commit 7fa9fcf

File tree

190 files changed

+5447
-4483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+5447
-4483
lines changed

.github/ISSUE_TEMPLATE.md renamed to .github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
---
2+
name: Bug report
3+
about: Make AndroidUtilCode more perfect!
4+
labels: bug
5+
assignees: Blankj
6+
7+
---
8+
19
## Describe the bug
210

311
A clear and concise description of what the bug is.
412

5-
- The version of utilcode: <!-- e.g. 1.16.3 -->
13+
- The version of AndroidUtilCode: <!-- e.g. utilcode:1.16.3 or utilcodex:1.16.3 -->
614
- The device: <!-- e.g. Nexus 5X -->
715
- The version of device: <!-- API 27 -->
816

@@ -39,6 +47,6 @@ put the stack of crash here
3947
If applicable, add screenshots to help explain your problem.
4048

4149

42-
Please delete the current line and the followings.
50+
## Please delete the current line and the following.
4351

44-
Thank you for supporting [AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode).
52+
Thank you for supporting [AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode).
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: 提交 Bug
3+
about: 让工具类更完美!
4+
labels: bug
5+
assignees: Blankj
6+
7+
---
8+
9+
## 描述 Bug
10+
11+
简洁地描述下 Bug。
12+
13+
- AndroidUtilCode 的版本:<!-- 例如 utilcode:1.16.3 或 utilcodex:1.16.3(这里面是注释,内容需要放在外面) -->
14+
- 出现 Bug 的设备型号:<!-- 例如 Nexus 5X -->
15+
- 设备的 Android 版本:<!-- 例如 API 27 -->
16+
17+
## 相关代码
18+
19+
<!-- 例如
20+
```java
21+
CrashUtils.init();
22+
```
23+
-->
24+
```
25+
put your code here
26+
```
27+
28+
## 异常堆栈
29+
30+
<!-- 例如
31+
```
32+
Caused by: java.lang.NullPointerException: u should init first
33+
at com.blankj.utilcode.util.Utils.getApp(Utils.java:98)
34+
at com.blankj.utilcode.util.CrashUtils.<clinit>(CrashUtils.java:55)
35+
at com.blankj.utilcode.util.CrashUtils.init(CrashUtils.java:168) 
36+
at com.blankj.androidutilcode.UtilsApp.initCrash(UtilsApp.java:71) 
37+
at com.blankj.androidutilcode.UtilsApp.onCreate(UtilsApp.java:33) 
38+
```
39+
-->
40+
41+
```
42+
put the stack of crash here
43+
```
44+
45+
## 截图
46+
47+
如果有的话请添加屏幕截图以帮助解释问题。
48+
49+
50+
## 请删除当前行及以下内容
51+
52+
感谢支持 [AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Make AndroidUtilCode more perfect!
4+
labels: help wanted
5+
assignees: Blankj
6+
7+
---
8+
9+
## Describe the feature
10+
11+
A clear and concise description of what the feature is.
12+
13+
14+
## Reference
15+
16+
Hope to give some reference articles, links, code, if any.
17+
18+
19+
## Please delete the current line and the following
20+
21+
Thank you for supporting [AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: 提交需求
3+
about: 让工具类更健全!
4+
labels: help wanted
5+
assignees: Blankj
6+
7+
---
8+
9+
## 描述需求
10+
11+
简洁地描述下需求。
12+
13+
14+
## 可借鉴的
15+
16+
如果有的话,可以给出一些参考文章、链接、代码
17+
18+
19+
## 请删除当前行及以下内容
20+
21+
感谢支持 [AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode).

.github/workflows/android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v1
11+
- uses: actions/checkout@v2
1212
- name: set up JDK 1.8
1313
uses: actions/setup-java@v1
1414
with:
1515
java-version: 1.8
1616
- name: Build with Gradle
17-
run: ./gradlew build
17+
run: ./gradlew build aR

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ local.properties
1010
.externalNativeBuild
1111
/apk
1212
*.phrof
13-
/maven
14-
/reports
13+
/mavenLocal
14+
/reports
15+
*/reports

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
* `20/04/13` [add] NumberUtils. Publish v1.28.0.
2+
* `20/04/12` [opt] TimeUtils#SDF_THREAD_LOCAL.
3+
* `20/04/11` [add] SDCardUtils#getXxTotalSize, SDCardUtils#getXxAvailableSize. FileUtils#getFsTotalSize, FileUtils#getFsAvailableSize.
4+
* `20/04/10` [fix] FileUtils#isFileExists; FragmentUtils#getTop bug. Publish v1.27.6.
5+
* `20/04/09` [add] UriUtils#res2Uri, UriUtils#uri2File support QQBrowser; ThreadUtils#getMainHandler; PathUtils#getxxPathExternalFirst.
6+
* `20/04/08` [fix] ActivityUtils#finish bug. Publish v1.27.5.
7+
* `20/04/08` [fix] CleanUtils clean dir not work. FileUtils#isFileExists. Publish v1.27.4.
8+
* `20/04/08` [fix] CrashUtils DefaultUncaughtExceptionHandler is wrong; LogUtils write file failed; Utils#getApp failed run on remote process. Publish v1.27.3.
9+
* `20/04/07` [mdf] GsonUtils#getGson() method public.
10+
* `20/04/04` [fix] ShadowUtils bug running on lower version devices. Publish v1.27.2.
11+
* `20/04/03` [fix] UtilsActivityLifecycleImpl#HashMap#remove IllegalStateException bug.
12+
* `20/04/02` [fix] PathUtils sdcard enable state is wrong; ActivityUtils finish activity wrong; Publish v1.27.1.
13+
* `20/03/31` [add] Publish v1.27.0.
14+
* `20/03/30` [add] BatteryUtils in subutil.
15+
* `20/03/27` [add] publish.gradle.
16+
* `20/03/24` [add] UtilsBridge to clean the utils.
17+
* `20/03/22` [upd] GsonUtils support custom gson.
18+
* `20/03/20` [add] ActivityUtils#addActivityLifecycleCallbacks, ActivityUtils#removeActivityLifecycleCallbacks.
19+
* `20/01/17` [upd] Leak Canary to v2.1.
20+
* `20/01/06` [add] ClickUtils#expandClickArea, ClickUtils#back2HomeFriendly
21+
* `19/11/30` [add] Publish bus plugin v2.4. Publish api plugin v1.2.
122
* `19/11/28` [add] Publish v1.26.0.
223
* `19/11/27` [add] Shadow demo.
324
* `19/11/26` [add] MVP demo.

README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
[frame]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/auc_frame_cn.png
5353

54-
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.26.0-brightgreen.svg
54+
[aucSvg]: https://github.com/Blankj/AndroidUtilCode/workflows/Android%20CI/badge.svg?branch=master
5555
[auc]: https://github.com/Blankj/AndroidUtilCode
5656

5757
[apiSvg]: https://img.shields.io/badge/API-14+-brightgreen.svg

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If this project helps you a lot and you want to support the project's developmen
5151

5252
[frame]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/auc_frame.png
5353

54-
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.26.0-brightgreen.svg
54+
[aucSvg]: https://github.com/Blankj/AndroidUtilCode/workflows/Android%20CI/badge.svg?branch=master
5555
[auc]: https://github.com/Blankj/AndroidUtilCode
5656

5757
[apiSvg]: https://img.shields.io/badge/API-14+-brightgreen.svg

build.gradle

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,9 @@ buildscript {
55
// use for debug plugin local
66
if (Config.depConfig.plugin_bus.useLocal || Config.depConfig.plugin_api.useLocal) {
77
maven() {
8-
url new File("maven")
8+
url new File("mavenLocal")
99
}
1010
}
11-
maven {
12-
url 'https://maven.aliyun.com/repository/public'
13-
name 'replace jcenter() and mavenCentral()'
14-
}
15-
maven {
16-
url 'https://maven.aliyun.com/repository/jcenter'
17-
name 'replace jcenter()'
18-
}
19-
maven {
20-
url 'https://maven.aliyun.com/repository/google'
21-
name 'replace google()'
22-
}
2311
google()
2412
jcenter()
2513
}
@@ -33,21 +21,7 @@ buildscript {
3321

3422
allprojects {
3523
repositories {
36-
maven {
37-
url 'https://maven.aliyun.com/repository/public'
38-
name 'replace jcenter() and mavenCentral()'
39-
}
40-
maven {
41-
url 'https://maven.aliyun.com/repository/jcenter'
42-
name 'replace jcenter()'
43-
}
44-
maven {
45-
url 'https://maven.aliyun.com/repository/google'
46-
name 'replace google()'
47-
}
48-
maven {
49-
url "https://jitpack.io"
50-
}
24+
maven { url "https://jitpack.io" }
5125
google()
5226
jcenter()
5327
}
@@ -58,12 +32,12 @@ allprojects {
5832
resolutionStrategy.eachDependency {
5933
if (it.requested.group == 'com.android.support'
6034
&& !it.requested.name.contains('multidex')) {
61-
it.useVersion Config.support_version
35+
it.useVersion Config.supportVersion
6236
}
6337
}
6438
}
6539
}
6640

6741
task clean(type: Delete) {
6842
delete rootProject.buildDir
69-
}
43+
}

buildApp.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ apply {
22
plugin "com.android.application"
33
plugin "kotlin-android"
44
plugin "kotlin-android-extensions"
5-
if (Config.depConfig.plugin_bus.isApply) {
6-
plugin Config.depConfig.plugin_bus.pluginId
7-
}
85
if (Config.depConfig.plugin_api.isApply) {
96
plugin Config.depConfig.plugin_api.pluginId
107
}
8+
if (Config.depConfig.plugin_bus.isApply) {
9+
plugin Config.depConfig.plugin_bus.pluginId
10+
}
1111
}
1212

1313
configSigning()
@@ -67,8 +67,6 @@ android {
6767
dependencies {
6868
// LeakCanary
6969
debugImplementation Config.depConfig.leakcanary_android.dep
70-
debugImplementation Config.depConfig.leakcanary_support_fragment.dep
71-
releaseImplementation Config.depConfig.leakcanary_android_no_op.dep
7270

7371
debugImplementation Config.depConfig.lib_utildebug.dep
7472
releaseImplementation Config.depConfig.lib_utildebug_no_op.dep
@@ -84,8 +82,8 @@ dependencies {
8482
}
8583

8684
def getSuffix() {
87-
if (project.path == ":feature:launcher:app") return ""
88-
return project.path.replace(":", "_").substring(":feature".length(), project.path.length() - ":app".length())
85+
if (project.name == "feature_launcher_app") return ""
86+
return "." + project.name.substring("feature_".length(), project.name.length() - "_app".length())
8987
}
9088

9189
def configSigning() {

buildLib.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,19 @@ android {
2424
lintOptions {
2525
abortOnError false
2626
}
27-
}
2827

29-
afterEvaluate {
30-
generateReleaseBuildConfig.enabled = false
31-
generateDebugBuildConfig.enabled = false
28+
// viewBinding {
29+
// enabled = true
30+
// }
3231
}
3332

3433
dependencies {
35-
if (project.name == 'pkg' || project.name == 'mock') {
34+
if (project.name.endsWith("_pkg") || project.name.endsWith("_mock")) {
3635
// if module's name equals 'pkg', api all of export
3736
for (def entrySet : ConfigUtils.getApplyExports().entrySet()) {
3837
api entrySet.value.dep
3938
}
40-
} else if (project.name == 'export') {
39+
} else if (project.name.endsWith("_export")) {
4140
api Config.depConfig.lib_common.dep
4241
}
4342
}

buildSrc/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ gradlePlugin {
1212
plugins {
1313
readmeCore {
1414
id = 'readme-core'
15-
implementationClass = 'com.blankj.plugin.ReadmeCorePlugin'
15+
implementationClass = 'com.blankj.plugin.readme.ReadmeCorePlugin'
1616
}
1717

1818
readmeSub {
1919
id = 'readme-sub'
20-
implementationClass = 'com.blankj.plugin.ReadmeSubPlugin'
20+
implementationClass = 'com.blankj.plugin.readme.ReadmeSubPlugin'
2121
}
2222
}
2323
}

0 commit comments

Comments
 (0)