1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27: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 {
allProjects = buildFileCompilerFactory.create(listOf(buildFile)).compileBuildFiles(args)
} 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}")
// if (! File(".kobalt").deleteRecursively()) {
// warn("Couldn't delete .kobalt, please delete it manually")
// } else {
// log(1, "Deleted .kobalt")
// allProjects = buildFileCompilerFactory.create(listOf(buildFile)).compileBuildFiles(args)
// }
if (! File(".kobalt").deleteRecursively()) {
warn("Couldn't delete the .kobalt directory, please delete it manually and try again")
return 1
} else {
log(1, "Deleted .kobalt")
allProjects = buildFileCompilerFactory.create(listOf(buildFile)).compileBuildFiles(args)
}
}
if (args.tasks) {