Skip to content
Snippets Groups Projects
Commit 9b6a1820 authored by Maxim Shafirov's avatar Maxim Shafirov
Browse files

Don't crash on non-js dependencies

parent bb3e939b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -40,8 +40,10 @@ class KWP implements Plugin<Project> {
writeSafely(new File(targetDir, "__modules.txt")) { buf ->
dependencies.each {jar ->
def m = unzipSafely(jar, targetDir)
def moduleName = m.name.substring(0, m.name.lastIndexOf('.'))
buf.append("${ moduleName}:${normalizedAbsolutePath(m)}\n")
if (m != null) {
def moduleName = m.name.substring(0, m.name.lastIndexOf('.'))
buf.append("${moduleName}:${normalizedAbsolutePath(m)}\n")
}
}
}
 
Loading
Loading
@@ -89,9 +91,12 @@ class KWP implements Plugin<Project> {
if (targets == 3) break
}
 
timestampFile.text = ""
timestampFile.text = targetFile?.absolutePath ?: "notfound.js"
timestampFile.setLastModified(jar.lastModified())
}
else {
targetFile = new File(timestampFile.text)
}
 
return targetFile
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment