|
@@ -21,20 +21,20 @@ public class AresTransform extends ModifyClassTransform {
|
|
|
} else if (path.endsWith(".jar")) {
|
|
|
if (path.contains("exploded-aar")) {
|
|
|
if (!path.contains("com.android.support")) {
|
|
|
-// //需要处理的jar包
|
|
|
-// File tmp = new File(input.getParent() + File.separator + "tmp")
|
|
|
-// tmp.deleteOnExit()
|
|
|
+ //需要处理的jar包
|
|
|
+ File tmp = new File(input.getParent() + File.separator + "tmp")
|
|
|
+ tmp.deleteOnExit()
|
|
|
|
|
|
-// boolean modify = false
|
|
|
-// if (!modify) JarZipUtil.unzipJar(input, tmp.absolutePath)
|
|
|
-// tmp.eachFileRecurse { File file ->
|
|
|
-// if (file.isFile()) {
|
|
|
-// if (modifyClass(file)) {
|
|
|
-// modify = true
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// if (modify) JarZipUtil.zipJar(tmp.absolutePath, input)
|
|
|
+ boolean modify = false
|
|
|
+ if (!modify) JarZipUtil.unzipJar(input, tmp.absolutePath)
|
|
|
+ tmp.eachFileRecurse { File file ->
|
|
|
+ if (file.isFile()) {
|
|
|
+ if (modifyClass(file)) {
|
|
|
+ modify = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (modify) JarZipUtil.zipJar(tmp.absolutePath, input)
|
|
|
}
|
|
|
}
|
|
|
}
|