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

Merge branch 'master' of github.com:cbeust/kobalt

This commit is contained in:
Cedric Beust 2017-12-09 09:00:09 -08:00
commit ae59e1d7ff
12 changed files with 81 additions and 57 deletions

View file

@ -56,7 +56,7 @@ class Profiles(val context: KobaltContext) {
val variable = if (match.first) match.second else oldMatch.second
if (oldMatch.first) {
warn("Old profile syntax detected for \"$line\"," +
warn("Old profile syntax detected for \"${line.trim()}\"," +
" please update to \"val $variable by profile()\"")
}

View file

@ -33,6 +33,15 @@ class ApplicationConfig {
@Directive
fun args(vararg argv: String) = argv.forEach { args.add(it) }
val args = arrayListOf<String>()
@Directive
var ignoreErrorStream: Boolean = false
@Directive
var ignoreInputStream: Boolean = true
@Directive
var ignoreExitValue: Boolean = false
}
@Directive
@ -147,6 +156,9 @@ class ApplicationPlugin @Inject constructor(val configActor: ConfigsActor<Applic
kobaltLog(1, "ERROR")
kobaltLog(1, output.joinToString("\n"))
}
useErrorStreamAsErrorIndicator = !config.ignoreErrorStream
useInputStreamAsErrorIndicator = !config.ignoreInputStream
ignoreExitValue = config.ignoreExitValue
}
return TaskResult(exitCode == 0)
}

View file

@ -239,7 +239,9 @@ class KotlinCompiler @Inject constructor(
location: CompilerMessageLocation?) {
if (severity.isError) {
"Couldn't compile file: ${dump(location, message)}".let { fullMessage ->
throw KobaltException(fullMessage)
error(fullMessage)
val ex = KobaltException(fullMessage)
throw ex
}
} else if (severity == CompilerMessageSeverity.WARNING && KobaltLogger.LOG_LEVEL >= 2) {
warn(dump(location, message))

View file

@ -105,7 +105,7 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
val outputFile = jarGenerator.fullArchiveName(project, context, it.name)
outputFiles.add(outputFile)
allIncludedFiles.addAll(files)
zipToFiles[it.name] = files
zipToFiles[outputFile.name] = files
}
}
}

View file

@ -1 +1 @@
kobalt.version=1.0.90
kobalt.version=1.0.92