Skip to content

Commit ccba200

Browse files
committed
opt: publish v1.31.0
1 parent d0b890e commit ccba200

File tree

9 files changed

+31
-21
lines changed

9 files changed

+31
-21
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* `21/12/06` [add] Publish v1.31.0
12
* `21/05/13` [add] Support publish mavenCentral.
23
* `21/02/22` [add] Fix ToastUtils rtl bug. Publish v1.30.6.
34
* `20/11/16` [add] Add ImageUtils#save2Album support param of dirName.

buildSrc/src/main/groovy/Config.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Config {
3434
lib_base : new ModuleConfig(isApply: true , useLocal: true , localPath: "./lib/base"),
3535
lib_common : new ModuleConfig(isApply: true , useLocal: true , localPath: "./lib/common"),
3636
lib_subutil : new ModuleConfig(isApply: true , useLocal: true , localPath: "./lib/subutil"),
37-
lib_utilcode : new ModuleConfig(isApply: true , useLocal: false, localPath: "./lib/utilcode", remotePath: "com.blankj:utilcode:$Config.versionName"),
37+
lib_utilcode : new ModuleConfig(isApply: true , useLocal: true , localPath: "./lib/utilcode", remotePath: "com.blankj:utilcodex:$Config.versionName"),
3838
lib_utildebug : new ModuleConfig(isApply: true , useLocal: true , localPath: "./lib/utildebug"),
3939
lib_utildebug_no_op : new ModuleConfig(isApply: true , useLocal: true , localPath: "./lib/utildebug-no-op"),
4040
/*Don't delete this line*/

config/publish.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ static def isAndroidEnv(Project project) {
220220
return project.getPlugins().hasPlugin('com.android.application') || project.getPlugins().hasPlugin('com.android.library')
221221
}
222222

223-
task publish2Local(type: GradleBuild, dependsOn: ['clean', 'assemble', 'publishReleasePublicationToMavenLocal']) {}
223+
task publish2Local(type: GradleBuild) {
224+
tasks = ['assemble', 'publishReleasePublicationToMavenLocal']
225+
}
224226

225-
task publish2Remote(type: GradleBuild, dependsOn: ['clean', 'assemble', 'publishReleasePublicationToMavenRepository']) {}
227+
task publish2Remote(type: GradleBuild) {
228+
tasks = ['assemble', 'publishReleasePublicationToMavenRepository']
229+
}

lib/utilcode/README-CN.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
Gradle:
44
```groovy
5-
implementation 'com.blankj:utilcode:1.30.6'
6-
75
// if u use AndroidX, use the following
8-
implementation 'com.blankj:utilcodex:1.30.6'
6+
implementation 'com.blankj:utilcodex:1.31.0'
7+
8+
// Not in maintenance
9+
implementation 'com.blankj:utilcode:1.30.6'
910
```
1011

1112

lib/utilcode/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
Gradle:
44
```groovy
5-
implementation 'com.blankj:utilcode:1.30.6'
6-
75
// if u use AndroidX, use the following
8-
implementation 'com.blankj:utilcodex:1.30.6'
6+
implementation 'com.blankj:utilcodex:1.31.0'
7+
8+
// Not in maintenance
9+
implementation 'com.blankj:utilcode:1.30.6'
910
```
1011

1112

lib/utilcode/src/main/java/com/blankj/utilcode/util/AppUtils.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -385,16 +385,16 @@ public static int getAppIconId(final String packageName) {
385385
}
386386
}
387387

388-
388+
389389
/**
390390
* Return true if this is the first ever time that the application is installed on the device.
391391
*
392392
* @return true if this is the first ever time that the application is installed on the device.
393393
*/
394-
public static boolean isFirstTimeInstall(){
394+
public static boolean isFirstTimeInstall() {
395395
try {
396-
Long firstInstallTime = Utils.getApp().getPackageManager().getPackageInfo(this.getAppPackageName(), 0).firstInstallTime;
397-
Long lastUpdateTime = Utils.getApp().getPackageManager().getPackageInfo(this.getAppPackageName(), 0).lastUpdateTime;
396+
long firstInstallTime = Utils.getApp().getPackageManager().getPackageInfo(getAppPackageName(), 0).firstInstallTime;
397+
long lastUpdateTime = Utils.getApp().getPackageManager().getPackageInfo(getAppPackageName(), 0).lastUpdateTime;
398398
return firstInstallTime == lastUpdateTime;
399399
} catch (Exception e) {
400400
return false;
@@ -406,17 +406,17 @@ public static boolean isFirstTimeInstall(){
406406
*
407407
* @return true if app was previously installed and this one is an update/upgrade to that one, returns false if this is a fresh installation and not an update/upgrade.
408408
*/
409-
public static boolean isAppUpgraded(){
409+
public static boolean isAppUpgraded() {
410410
try {
411-
Long firstInstallTime = Utils.getApp().getPackageManager().getPackageInfo(this.getAppPackageName(), 0).firstInstallTime;
412-
Long lastUpdateTime = Utils.getApp().getPackageManager().getPackageInfo(this.getAppPackageName(), 0).lastUpdateTime;
411+
long firstInstallTime = Utils.getApp().getPackageManager().getPackageInfo(getAppPackageName(), 0).firstInstallTime;
412+
long lastUpdateTime = Utils.getApp().getPackageManager().getPackageInfo(getAppPackageName(), 0).lastUpdateTime;
413413
return firstInstallTime != lastUpdateTime;
414414
} catch (Exception e) {
415415
return false;
416416
}
417417
}
418-
419-
418+
419+
420420
/**
421421
* Return the application's package name.
422422
*

lib/utilcode/src/main/java/com/blankj/utilcode/util/NetworkUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import android.content.Intent;
77
import android.content.IntentFilter;
88
import android.net.ConnectivityManager;
9+
import android.net.NetworkCapabilities;
910
import android.net.NetworkInfo;
1011
import android.net.wifi.ScanResult;
1112
import android.net.wifi.WifiInfo;
@@ -280,9 +281,9 @@ public static boolean isBehindProxy(){
280281
public static boolean isUsingVPN(){
281282
ConnectivityManager cm = (ConnectivityManager) com.blankj.utilcode.util.Utils.getApp().getSystemService(Context.CONNECTIVITY_SERVICE);
282283
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
283-
return cm.getNetworkInfo(ConnectivityManager.TYPE_VPN).isConnectedOrConnecting()
284+
return cm.getNetworkInfo(ConnectivityManager.TYPE_VPN).isConnectedOrConnecting();
284285
} else {
285-
return cm.getNetworkInfo(NetworkCapabilities.TRANSPORT_VPN).isConnectedOrConnecting()
286+
return cm.getNetworkInfo(NetworkCapabilities.TRANSPORT_VPN).isConnectedOrConnecting();
286287
}
287288
}
288289

lib/utilcode/src/main/java/com/blankj/utilcode/util/TimeUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.blankj.utilcode.util;
22

33
import android.annotation.SuppressLint;
4+
import android.os.Build;
5+
import android.provider.Settings;
46

57
import com.blankj.utilcode.constant.TimeConstants;
68

module_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{"name": "lib_base", "isApply": true, "useLocal": true, "localPath": "./lib/base"},
2424
{"name": "lib_common", "isApply": true, "useLocal": true, "localPath": "./lib/common"},
2525
{"name": "lib_subutil", "isApply": true, "useLocal": true, "localPath": "./lib/subutil"},
26-
{"name": "lib_utilcode", "isApply": true, "useLocal": false, "localPath": "./lib/utilcode", "remotePath": "com.blankj:utilcodex:$Config.versionName"},
26+
{"name": "lib_utilcode", "isApply": true, "useLocal": true, "localPath": "./lib/utilcode", "remotePath": "com.blankj:utilcodex:$Config.versionName"},
2727
{"name": "lib_utildebug", "isApply": true, "useLocal": true, "localPath": "./lib/utildebug"},
2828
{"name": "lib_utildebug_no_op", "isApply": true, "useLocal": true, "localPath": "./lib/utildebug-no-op"}
2929
]

0 commit comments

Comments
 (0)