Skip to content

Commit e448f92

Browse files
authored
Merge pull request #748 from Blankj/1.22.2
1.22.2
2 parents f1c6ccb + e265d78 commit e448f92

File tree

144 files changed

+645
-536
lines changed

Some content is hidden

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

144 files changed

+645
-536
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* `18/12/17` [fix] ToastUtils leak. Publish v1.22.2.
12
* `18/12/09` [add] Component for the project.
23
* `18/12/04` [add] BusUtils. Publish v1.22.1.
34
* `18/11/18` [fix] ToastUtils don't show in the devices grater than API 24 when close the permission of notification. Publish v1.22.0.

README-CN.md

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

4242
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
4343

44-
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.1-brightgreen.svg
44+
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.2-brightgreen.svg
4545
[auc]: https://github.com/Blankj/AndroidUtilCode
4646

4747
[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
@@ -41,7 +41,7 @@ If this project helps you a lot and you want to support the project's developmen
4141

4242
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
4343

44-
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.1-brightgreen.svg
44+
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.2-brightgreen.svg
4545
[auc]: https://github.com/Blankj/AndroidUtilCode
4646

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

bus-gradle-plugin/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## v1.6
4+
修复 inject 时候 zip 操作不对导致混淆出错的问题
5+
36
## v1.5
47
升级 javassist 来修复 Kotlin 匿名类 NotFoundException
58

bus-gradle-plugin/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ apply {
77
plugin "java-gradle-plugin"
88
from "${rootDir.path}/gradle/pluginPublish.gradle"
99
if (bus.isDebug) {
10-
plugin 'maven'
10+
plugin "maven"
1111
from "${rootDir.path}/gradle/localMavenUpload.gradle"
1212
} else {
13-
plugin 'com.github.dcendents.android-maven'
14-
plugin 'com.jfrog.bintray'
13+
plugin "com.github.dcendents.android-maven"
14+
plugin "com.jfrog.bintray"
1515
from "${rootDir.path}/gradle/bintrayUploadJava.gradle"
1616
}
1717
}
@@ -26,6 +26,7 @@ gradlePlugin {
2626
}
2727

2828
dependencies {
29+
implementation dep.plugin[0]
2930
implementation dep.javassist
3031
implementation dep.commons_io
3132
implementation gradleApi()

bus-gradle-plugin/src/main/java/com/blankj/bus/BusInject.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class BusInject {
2525
callMethod.insertAfter(getInsertContent(bus, true));
2626
}
2727
busUtils.writeFile(decompressedJarPath)
28-
busUtils.defrost();
28+
busUtils.defrost()
2929
FileUtils.forceDelete(busJar)
30-
ZipUtils.zipFile(decompressedJar, busJar)
30+
ZipUtils.zipFiles(Arrays.asList(decompressedJar.listFiles()), busJar)
3131
FileUtils.forceDelete(decompressedJar)
3232
}
3333

bus-gradle-plugin/src/main/java/com/blankj/bus/BusTransform.groovy

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@ class BusTransform extends Transform {
6868
)
6969
FileUtils.copyDirectory(dir, dest)
7070

71-
LogUtils.l("scan dir: " + dirInput.name)
71+
LogUtils.l("scan dir: $dir [$dest]")
7272

7373
busScan.scanDir(dir)
7474
}
75-
7675
input.jarInputs.each { JarInput jarInput ->// 遍历 jar 文件
7776
File jar = jarInput.file
7877
JavassistUtils.getPool().appendClassPath(jarInput.file.absolutePath)
@@ -86,21 +85,22 @@ class BusTransform extends Transform {
8685
)
8786
FileUtils.copyFile(jar, dest)
8887

89-
if (jumpScan(jarName)) {
90-
LogUtils.l("jump jar: " + jarName)
91-
return
92-
}
93-
9488
if (jarName.startsWith("com.blankj:utilcode:")
9589
|| jarName.contains("utilcode-lib")) {
9690
busScan.busJar = dest
97-
LogUtils.l("bus jar: " + jarName)
91+
LogUtils.l("bus jar: $jarName [$dest]")
9892
return
9993
}
10094

101-
LogUtils.l("scan jar: " + jarName)
95+
if (jumpScan(jarName)) {
96+
LogUtils.l("jump jar: $jarName [$dest]")
97+
return
98+
}
99+
100+
LogUtils.l("scan jar: $jarName [$dest]")
102101
busScan.scanJar(jar)
103102
}
103+
104104
}
105105

106106
if (busScan.busJar != null) {

bus-gradle-plugin/src/main/java/com/blankj/bus/Config.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ class Config {
88
'com.android.support:',
99
'com.android.support.constraint:',
1010
'android.arch.',
11-
'com.blankj:'
11+
'com.blankj:',
12+
'org.jetbrains.kotlin:',
13+
'org.jetbrains:',
14+
'com.squareup.'
1215
]
1316

1417
public static final String FILE_SEP = System.getProperty("file.separator")

config.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ ext {
55
compileSdkVersion = 27
66
minSdkVersion = 14
77
targetSdkVersion = 27
8-
versionCode = 1_022_001
9-
versionName = '1.22.1'// E.g. 1.9.72 => 1,009,072
8+
versionCode = 1_022_002
9+
versionName = '1.22.2'// E.g. 1.9.72 => 1,009,072
1010

1111
bus = [
1212
isDebug: false,
13-
version: '1.5',
13+
version: '1.6',
1414
group : 'com.blankj'
1515
]
1616

@@ -41,7 +41,7 @@ ext {
4141
android : "com.squareup.leakcanary:leakcanary-android:$leakcanary_version",
4242
android_no_op: "com.squareup.leakcanary:leakcanary-android-no-op:$leakcanary_version",
4343
],
44-
free_proguard: "com.blankj:free-proguard:0.0.9",
44+
free_proguard: "com.blankj:free-proguard:0.0.7",
4545
adapt_screen : "com.blankj:adapt-screen:0.0.3",
4646

4747
gson : "com.google.code.gson:gson:2.8.2",

config_app.gradle

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ android {
2121
}
2222

2323
buildTypes {
24+
debug {
25+
minifyEnabled false
26+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
27+
}
2428
release {
2529
minifyEnabled true
26-
consumerProguardFiles 'proguard-rules.pro'
2730
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2831
}
2932
}
@@ -45,7 +48,7 @@ private String getSuffix() {
4548
String[] splits = project.name.split("-")
4649
String suffix = ""
4750
if (splits.length == 2) {
48-
suffix = "." + splits[0]
51+
suffix = "_" + splits[0]
4952
}
5053
return suffix
5154
}
@@ -61,7 +64,7 @@ def configSigning(Project pro) {
6164
properties.load(new FileInputStream(signPropertiesFile))
6265
signingConfigs {
6366
release {
64-
storeFile file(properties['keystore'])
67+
storeFile new File(signPropertiesFile.getParent(), properties['keystore'])
6568
storePassword properties['storePassword']
6669
keyAlias properties['keyAlias']
6770
keyPassword properties['keyPassword']
@@ -75,9 +78,11 @@ def configSigning(Project pro) {
7578
def configApkName(Project pro) {
7679
pro.android.applicationVariants.all { variant ->
7780
if (variant.buildType.name != "debug") {
78-
variant.getPackageApplication().outputDirectory = new File(project.rootDir.absolutePath + "/apk")
81+
variant.getPackageApplication().outputDirectory = new File("${rootDir.path}/apk")
7982
variant.getPackageApplication().outputScope.apkDatas.forEach { apkData ->
80-
apkData.outputFileName = "util_" + variant.versionName.replace(".", "_") + ".apk"
83+
apkData.outputFileName = "util" + suffix +
84+
"_" + variant.versionName.replace(".", "_") +
85+
".apk"
8186
}
8287
}
8388
}

0 commit comments

Comments
 (0)