Skip to content

Commit 3afe6cd

Browse files
committed
prefect:去掉强制清理 dex 缓存,在 agp 8.1.1(gradle 8.6) 上测试已经正常
1 parent 4679937 commit 3afe6cd

File tree

1 file changed

+0
-12
lines changed
  • lib_bcu_plugin/src/main/java/com/ysj/lib/bytecodeutil/plugin

1 file changed

+0
-12
lines changed

lib_bcu_plugin/src/main/java/com/ysj/lib/bytecodeutil/plugin/AppendTask.kt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,6 @@ abstract class AppendTask : DefaultTask() {
5050
logger.quiet(">>> BCU append output ---> $outputDir")
5151
logger.quiet(">>> BCU append isIncremental ---> ${inputChanges.isIncremental}")
5252
val startTime = System.currentTimeMillis()
53-
// delete: "build/intermediates/project_dex_archive" can fix generate dex increment error
54-
val projectDexArchive = File(File(project.buildDir, "intermediates"), "project_dex_archive")
55-
if (!inputChanges.isIncremental) {
56-
projectDexArchive.deleteRecursively()
57-
outputDir
58-
.walkBottomUp()
59-
.filterNot { it.name.endsWith(".jar") }
60-
.forEach { it.delete() }
61-
}
6253
val removedCount = Ref.IntRef()
6354
val removedGroup = ArrayList<ArrayList<File>>(50)
6455
val modifiedCount = Ref.IntRef()
@@ -96,9 +87,6 @@ abstract class AppendTask : DefaultTask() {
9687
it.outputDir.set(outputDir)
9788
}
9889
}
99-
if (removedGroup.isNotEmpty() || modifiedGroup.isNotEmpty()) {
100-
projectDexArchive.deleteRecursively()
101-
}
10290
// 等移除和修改执行完才能添加,否则可能产生文件冲突
10391
workQueue.await()
10492
addedGroup.forEach { files ->

0 commit comments

Comments
 (0)