1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-25 16:07:12 -07:00

Correct Kobalt jar file detection.

This commit is contained in:
Cedric Beust 2015-10-19 20:23:50 -07:00
parent 575e87eb36
commit 3539e67c1a

View file

@ -20,12 +20,12 @@ public class KFiles {
} else {
val jar = joinDir(distributionsDir, Kobalt.version, "kobalt/wrapper/kobalt-" + Kobalt.version + ".jar")
val jarFile = File(jar)
if (! jarFile.exists()) {
if (jarFile.exists()) {
return jarFile.absolutePath
} else {
// Will only happen when building kobalt itself: the jar file might not be in the dist/ directory
// yet since we're currently building it. Instead, use the classes directly
debug("Couldn't find a kobalt.jar file, using build/classes/main")
debug("Couldn't find ${jarFile.absolutePath}, using build/classes/main")
return java.io.File(joinDir("build", "classes", "main")).absolutePath
}
}