Skip to content

Commit 9ac728d

Browse files
committed
Release 3.1.1
1 parent 6008c00 commit 9ac728d

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

aop/ext.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project.ext {
2-
pluginVersion = '3.1.0'
2+
pluginVersion = '3.1.1'
33
Properties properties = new Properties()
44
if (project.file('local.properties').exists()) {
55
properties.load(project.file('local.properties').newDataInputStream())

aop/src/main/groovy/com/sensorsdata/analytics/android/plugin/SensorsAnalyticsTransform.groovy

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import java.util.zip.ZipEntry
4646

4747
class SensorsAnalyticsTransform extends Transform {
4848
private SensorsAnalyticsTransformHelper transformHelper
49-
public static final String VERSION = "3.1.0"
49+
public static final String VERSION = "3.1.1"
5050
public static final String MIN_SDK_VERSION = "3.0.0"
5151
private WaitableExecutor waitableExecutor
5252

@@ -254,8 +254,8 @@ class SensorsAnalyticsTransform extends Transform {
254254
}
255255

256256
private File modifyJar(File jarFile, File tempDir, boolean isNameHex) {
257-
//取原 jar
258-
def file = new JarFile(jarFile)
257+
//取原 jar, verify 参数传 false, 代表对 jar 包不进行签名校验
258+
def file = new JarFile(jarFile, false)
259259
//设置输出到的 jar
260260
def tmpNameHex = ""
261261
if (isNameHex) {
@@ -267,8 +267,13 @@ class SensorsAnalyticsTransform extends Transform {
267267

268268
while (enumeration.hasMoreElements()) {
269269
JarEntry jarEntry = (JarEntry) enumeration.nextElement()
270-
InputStream inputStream = file.getInputStream(jarEntry)
271-
270+
InputStream inputStream
271+
try {
272+
inputStream = file.getInputStream(jarEntry)
273+
} catch (Exception e) {
274+
e.printStackTrace()
275+
return null
276+
}
272277
String entryName = jarEntry.getName()
273278
if (entryName.endsWith(".DSA") || entryName.endsWith(".SF")) {
274279
//ignore

0 commit comments

Comments
 (0)