Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0c90ed0

Browse filesBrowse files
author
Blankj
committed
see 05/04 log
1 parent 65016bd commit 0c90ed0
Copy full SHA for 0c90ed0

13 files changed

+365-340Lines changed: 365 additions & 340 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
.DS_Store
66
/build
77
/captures
8-
.externalNativeBuild
8+
.externalNativeBuild
9+
/sign
Collapse file

‎app/build.gradle‎

Copy file name to clipboardExpand all lines: app/build.gradle
+20-3Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
apply plugin: 'com.android.application'
22

3+
File signPropertiesFile = rootProject.file('sign/keystore.properties')
4+
35
android {
46
compileSdkVersion 25
57
buildToolsVersion "25.0.2"
@@ -8,10 +10,22 @@ android {
810
applicationId "com.blankj.androidutilcode"
911
minSdkVersion 15
1012
targetSdkVersion 16
11-
versionCode 21
12-
versionName "1.4.1"
13+
versionCode 30
14+
versionName "1.5.0"
1315
}
1416

17+
if (signPropertiesFile.exists()) {
18+
Properties properties = new Properties()
19+
properties.load(new FileInputStream(signPropertiesFile))
20+
signingConfigs {
21+
release {
22+
storeFile rootProject.file(properties['keystore'])
23+
storePassword properties['storePassword']
24+
keyAlias properties['keyAlias']
25+
keyPassword properties['keyPassword']
26+
}
27+
}
28+
}
1529

1630
buildTypes {
1731
debug {
@@ -21,9 +35,12 @@ android {
2135
release {
2236
minifyEnabled true
2337
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
38+
if (signPropertiesFile.exists()) {
39+
signingConfig signingConfigs.release
40+
}
2441
}
2542
}
26-
43+
2744
lintOptions {
2845
abortOnError false
2946
}
Collapse file

‎app/src/main/res/values/strings.xml‎

Copy file name to clipboardExpand all lines: app/src/main/res/values/strings.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<string name="my_app_name">AndroidUtilCode</string>
3+
<string name="my_app_name">Util</string>
44

55
<string name="git_hub">GitHub</string>
66
<string name="blog">Blog</string>
Collapse file

‎update_log.md‎

Copy file name to clipboardExpand all lines: update_log.md
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* 17/05/04 新增签名
2+
* 17/05/03 对齐头部日期
13
* 17/05/02 Demo的string字符串变更,完善ToastUtils和SnackbarUtils
24
* 17/04/27 添加Travis CI,使用shields,发布1.4.1
35
* 17/04/26 完善HandlerUtils使用Handler.CallBack的回调接口及SpannableStringUtils图片对齐
Collapse file

‎utilcode/build.gradle‎

Copy file name to clipboardExpand all lines: utilcode/build.gradle
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66

77
defaultConfig {
88
minSdkVersion 15
9-
versionCode 21
10-
versionName "1.4.1"
9+
versionCode 30
10+
versionName "1.5.0"
1111
}
1212

1313
buildTypes {
@@ -24,6 +24,10 @@ android {
2424
lintOptions {
2525
abortOnError false
2626
}
27+
28+
testOptions {
29+
reportDir = "$project.buildDir/foo/report"
30+
}
2731
}
2832

2933
tasks.matching {it instanceof Test}.all {
@@ -33,7 +37,7 @@ tasks.matching {it instanceof Test}.all {
3337
dependencies {
3438
final SUPPORT_VERSION = '25.3.1'
3539
final JUNIT_VERSION = '4.12'
36-
final TRUTH_VERSION = '0.29'
40+
final TRUTH_VERSION = '0.31'
3741
final ROBOLECTRIC_VERSION = '3.1.2'
3842

3943
provided "com.android.support:appcompat-v7:$SUPPORT_VERSION"
Collapse file

‎utilcode/src/main/java/com/blankj/utilcode/util/BarUtils.java‎

Copy file name to clipboardExpand all lines: utilcode/src/main/java/com/blankj/utilcode/util/BarUtils.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ private static StatusBarView createStatusBarView(Activity activity, int color, i
531531
/**
532532
* 设置根布局参数
533533
*/
534-
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
535534
private static void setRootView(Activity activity) {
536535
ViewGroup rootView = (ViewGroup) ((ViewGroup) activity.findViewById(android.R.id.content)).getChildAt(0);
537536
rootView.setFitsSystemWindows(true);
Collapse file

‎utilcode/src/main/java/com/blankj/utilcode/util/CacheUtils.java‎

Copy file name to clipboardExpand all lines: utilcode/src/main/java/com/blankj/utilcode/util/CacheUtils.java
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,6 @@ public void clear() {
522522
mCacheManager.clear();
523523
}
524524

525-
/**
526-
* @author 杨福海(michael) www.yangfuhai.com
527-
* @version 1.0
528-
* @title 缓存管理器
529-
*/
530525
public class CacheManager {
531526
private final AtomicLong cacheSize;
532527
private final AtomicInteger cacheCount;
Collapse file

‎utilcode/src/main/java/com/blankj/utilcode/util/EncryptUtils.java‎

Copy file name to clipboardExpand all lines: utilcode/src/main/java/com/blankj/utilcode/util/EncryptUtils.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ public static byte[] encryptMD5File(File file) {
166166
MessageDigest md = MessageDigest.getInstance("MD5");
167167
digestInputStream = new DigestInputStream(fis, md);
168168
byte[] buffer = new byte[256 * 1024];
169-
//noinspection StatementWithEmptyBody
170-
while (digestInputStream.read(buffer) > 0) ;
169+
while (true) {
170+
if (!(digestInputStream.read(buffer) > 0)) break;
171+
}
171172
md = digestInputStream.getMessageDigest();
172173
return md.digest();
173174
} catch (NoSuchAlgorithmException | IOException e) {
Collapse file

‎utilcode/src/main/java/com/blankj/utilcode/util/FileUtils.java‎

Copy file name to clipboardExpand all lines: utilcode/src/main/java/com/blankj/utilcode/util/FileUtils.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,8 +1185,9 @@ public static byte[] getFileMD5(File file) {
11851185
MessageDigest md = MessageDigest.getInstance("MD5");
11861186
dis = new DigestInputStream(fis, md);
11871187
byte[] buffer = new byte[1024 * 256];
1188-
//noinspection StatementWithEmptyBody
1189-
while (dis.read(buffer) > 0) ;
1188+
while (true) {
1189+
if (!(dis.read(buffer) > 0)) break;
1190+
}
11901191
md = dis.getMessageDigest();
11911192
return md.digest();
11921193
} catch (NoSuchAlgorithmException | IOException e) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.