mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Handle jar signer errors.
This commit is contained in:
parent
2febea27a7
commit
1b472cd625
2 changed files with 10 additions and 4 deletions
|
@ -23,6 +23,7 @@ open class RunCommand(val command: String) {
|
||||||
* This field is used to specify how errors are caught.
|
* This field is used to specify how errors are caught.
|
||||||
*/
|
*/
|
||||||
var useErrorStreamAsErrorIndicator = true
|
var useErrorStreamAsErrorIndicator = true
|
||||||
|
var useInputStreamAsErrorIndicator = false
|
||||||
|
|
||||||
fun useErrorStreamAsErrorIndicator(f: Boolean) : RunCommand {
|
fun useErrorStreamAsErrorIndicator(f: Boolean) : RunCommand {
|
||||||
useErrorStreamAsErrorIndicator = f
|
useErrorStreamAsErrorIndicator = f
|
||||||
|
@ -52,6 +53,9 @@ open class RunCommand(val command: String) {
|
||||||
if (useErrorStreamAsErrorIndicator && ! hasErrors) {
|
if (useErrorStreamAsErrorIndicator && ! hasErrors) {
|
||||||
hasErrors = hasErrors || hasErrorStream
|
hasErrors = hasErrors || hasErrorStream
|
||||||
}
|
}
|
||||||
|
if (useInputStreamAsErrorIndicator && ! hasErrors) {
|
||||||
|
hasErrors = hasErrors || process.inputStream.available() > 0
|
||||||
|
}
|
||||||
|
|
||||||
if (! hasErrors) {
|
if (! hasErrors) {
|
||||||
successCallback(fromStream(process.inputStream))
|
successCallback(fromStream(process.inputStream))
|
||||||
|
|
|
@ -308,7 +308,9 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler, v
|
||||||
throw KobaltException("No signingConfig found for product type $buildType")
|
throw KobaltException("No signingConfig found for product type $buildType")
|
||||||
}
|
}
|
||||||
|
|
||||||
val success = RunCommand("jarsigner").run(listOf(
|
val success = RunCommand("jarsigner").apply {
|
||||||
|
// useInputStreamAsErrorIndicator = true
|
||||||
|
}.run(listOf(
|
||||||
"-keystore", signingConfig.storeFile,
|
"-keystore", signingConfig.storeFile,
|
||||||
"-storepass", signingConfig.storePassword,
|
"-storepass", signingConfig.storePassword,
|
||||||
"-keypass", signingConfig.keyPassword,
|
"-keypass", signingConfig.keyPassword,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue