Skip to content

Commit

Permalink
Merge pull request #682 from YuTianTina/issue_576
Browse files Browse the repository at this point in the history
fix when jar does not exist in repacage then pass
  • Loading branch information
bnotebook authored Nov 14, 2018
2 parents 89c4066 + 5da39de commit e3d5ec3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ public class ReClassTransform extends Transform {
jar = new File(jarPath)
}

if(!jar.exists()){
return
}

String destName = input.name
def hexName = DigestUtils.md5Hex(jar.absolutePath)
if (destName.endsWith('.jar')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ public class Util {
* 压缩 dirPath 到 zipFilePath
*/
def static zipDir(String dirPath, String zipFilePath) {
new AntBuilder().zip(destfile: zipFilePath, basedir: dirPath)
File dir = new File(dirPath)
if(dir.exists()){
new AntBuilder().zip(destfile: zipFilePath, basedir: dirPath)
}else{
println ">>> Zip file is empty! Ignore"
}
}

/**
Expand Down

0 comments on commit e3d5ec3

Please sign in to comment.