21 lines
488 B
Groovy
21 lines
488 B
Groovy
//
|
|
// Copyright (c) 2022 Wind River Systems, Inc.
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
def call() {
|
|
return params.collect {
|
|
if (it.value instanceof Boolean) {
|
|
return booleanParam (name: it.key, value: it.value)
|
|
}
|
|
else if (it.value instanceof String) {
|
|
return string (name: it.key, value: it.value)
|
|
}
|
|
else {
|
|
error "unsupported parameter type: key=${it.key} type=${it.value.class}"
|
|
}
|
|
}
|
|
}
|
|
|