Skip to content

Commit 59735dc

Browse files
author
weiqiangliu
committed
Release 3.2.14
1 parent 9663400 commit 59735dc

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

plugin/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.2.13'
2+
pluginVersion = '3.2.14'
33
Properties properties = new Properties()
44
if (project.file('local.properties').exists()) {
55
properties.load(project.file('local.properties').newDataInputStream())

plugin/src/main/groovy/com/sensorsdata/analytics/android/plugin/SensorsAnalyticsClassVisitor.groovy

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ class SensorsAnalyticsClassVisitor extends ClassVisitor {
152152
}
153153
return super.visitField(access, name, descriptor, signature, value)
154154
}
155+
155156
/**
156157
* 该方法是当扫描器扫描到类的方法时进行调用
157158
* @param access 表示方法的修饰符
@@ -359,6 +360,14 @@ class SensorsAnalyticsClassVisitor extends ClassVisitor {
359360
}
360361
}
361362

363+
@Override
364+
void visitFieldInsn(int opcode, String owner, String fieldName, String fieldDesc) {
365+
if (classNameAnalytics.isSensorsDataAPI && "ANDROID_PLUGIN_VERSION" == fieldName && opcode == PUTSTATIC) {
366+
methodVisitor.visitLdcInsn(SensorsAnalyticsTransform.VERSION)
367+
}
368+
super.visitFieldInsn(opcode, owner, fieldName, fieldDesc)
369+
}
370+
362371
void handleCode() {
363372
if (isHasInstrumented || classNameAnalytics.isSensorsDataAPI) {
364373
return

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import java.util.jar.JarOutputStream
4545

4646
class SensorsAnalyticsTransform extends Transform {
4747
private SensorsAnalyticsTransformHelper transformHelper
48-
public static final String VERSION = "3.2.13"
48+
public static final String VERSION = "3.2.14"
4949
public static final String MIN_SDK_VERSION = "4.3.2"
5050
private WaitableExecutor waitableExecutor
5151
private URLClassLoader urlClassLoader

0 commit comments

Comments
 (0)