Skip to content

Commit 304bc70

Browse files
committed
Release 2.0.4
1 parent 0da4e0a commit 304bc70

File tree

4 files changed

+72
-2
lines changed

4 files changed

+72
-2
lines changed

.idea/codeStyles/Project.xml

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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 = '2.0.3'
2+
pluginVersion = '2.0.4'
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: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,17 @@ class SensorsAnalyticsTransform extends Transform {
149149
}
150150
}
151151

152+
private static boolean isShouldModifyJar(String jarName) {
153+
Iterator<String> iterator = exclude.iterator()
154+
while (iterator.hasNext()) {
155+
String packageName = iterator.next()
156+
if (packageName == jarName) {
157+
return false
158+
}
159+
}
160+
return true
161+
}
162+
152163
private static boolean isShouldModify(String className) {
153164
Iterator<String> iterator = exclude.iterator()
154165
while (iterator.hasNext()) {
@@ -165,7 +176,9 @@ class SensorsAnalyticsTransform extends Transform {
165176
*/
166177
private static File modifyJarFile(File jarFile, File tempDir) {
167178
if (jarFile) {
168-
return modifyJar(jarFile, tempDir, true)
179+
if (isShouldModifyJar(jarFile.getName())) {
180+
return modifyJar(jarFile, tempDir, true)
181+
}
169182

170183
}
171184
return null

0 commit comments

Comments
 (0)