Skip to content

Commit 2bafd80

Browse files
committed
fix bug
1 parent f8a5b27 commit 2bafd80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/src/main/groovy/top/niunaijun/blackobfuscator/ObfPlugin.groovy

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ public class ObfPlugin implements Plugin<Project> {
100100
Task task = mProject.tasks.getByName(name)
101101
if (!tasks.contains(task)) {
102102
tasks.add(task)
103-
mTaskMapping.put(task.name, mappingFile.absolutePath)
103+
if (mappingFile != null) {
104+
mTaskMapping.put(task.name, mappingFile.absolutePath)
105+
}
104106
println("add Task $name")
105107
}
106108
} catch(UnknownTaskException e1) {

0 commit comments

Comments
 (0)