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

Handle ABI changes better.

This commit is contained in:
Cedric Beust 2015-11-03 21:03:56 -08:00
parent 1c4afba7c1
commit d388291427

View file

@ -120,14 +120,15 @@ private class Main @Inject constructor(
try { try {
allProjects = buildFileCompilerFactory.create(listOf(buildFile)).compileBuildFiles(args) allProjects = buildFileCompilerFactory.create(listOf(buildFile)).compileBuildFiles(args)
} catch(ex: Throwable) { } catch(ex: Throwable) {
error("Couldn't build", ex.cause ?: ex) // This can happen if the ABI for the build script file changed. Try to wipe .kobalt.
log(2, "Couldn't parse preBuildScript.jar: ${ex.message}") log(2, "Couldn't parse preBuildScript.jar: ${ex.message}")
// if (! File(".kobalt").deleteRecursively()) { if (! File(".kobalt").deleteRecursively()) {
// warn("Couldn't delete .kobalt, please delete it manually") warn("Couldn't delete the .kobalt directory, please delete it manually and try again")
// } else { return 1
// log(1, "Deleted .kobalt") } else {
// allProjects = buildFileCompilerFactory.create(listOf(buildFile)).compileBuildFiles(args) log(1, "Deleted .kobalt")
// } allProjects = buildFileCompilerFactory.create(listOf(buildFile)).compileBuildFiles(args)
}
} }
if (args.tasks) { if (args.tasks) {