diff --git a/gradle-launcher/src/main/kotlin/com/github/burrunan/launcher/GradleLauncher.kt b/gradle-launcher/src/main/kotlin/com/github/burrunan/launcher/GradleLauncher.kt index c22294a..236c179 100644 --- a/gradle-launcher/src/main/kotlin/com/github/burrunan/launcher/GradleLauncher.kt +++ b/gradle-launcher/src/main/kotlin/com/github/burrunan/launcher/GradleLauncher.kt @@ -65,7 +65,14 @@ suspend fun launchGradle(params: LaunchParams): GradleResult { failureDetected = true val shortFile = error.file ?.removePrefix(process.cwd()) - actions.core.error(error.message, shortFile, error.line, error.col) + actions.core.error( + error.message, + jso { + file = shortFile + startLine = error.line + startColumn = error.col + }, + ) } if (failureDetected) { process.exitCode = ExitCode.Failure.unsafeCast() diff --git a/wrappers/actions-cache/src/main/kotlin/actions/cache/CacheExtensions.kt b/wrappers/actions-cache/src/main/kotlin/actions/cache/CacheExtensions.kt index 6b5e0ac..e73a673 100644 --- a/wrappers/actions-cache/src/main/kotlin/actions/cache/CacheExtensions.kt +++ b/wrappers/actions-cache/src/main/kotlin/actions/cache/CacheExtensions.kt @@ -44,7 +44,7 @@ suspend fun restoreAndLog( result?.removePrefix(version)?.let { return if (it.endsWith(primaryKey)) RestoreType.Exact(it) else RestoreType.Partial(it) } - info("Cache was not found for $primaryKey, restore keys: ${restoreKeys.joinToString(", ")}") + info("Cache was not found for version=$version, primaryKey=$primaryKey, restore keys=${restoreKeys.joinToString(", ")}") return RestoreType.None } diff --git a/wrappers/actions-toolkit/src/main/kotlin/actions/core/issueCommandExtensions.kt b/wrappers/actions-toolkit/src/main/kotlin/actions/core/issueCommandExtensions.kt deleted file mode 100644 index 092ad7c..0000000 --- a/wrappers/actions-toolkit/src/main/kotlin/actions/core/issueCommandExtensions.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2020 Vladimir Sitnikov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package actions.core - -import js.core.jso - -external interface TypedCommandProperties : CommandProperties { - var file: String - var line: Int - var col: Int -} - -inline fun issueCommand(command: String, message: String, properties: TypedCommandProperties.() -> Unit = {}) = - issueCommand(command, jso(properties), message) - -fun warning(message: String, file: String? = null, line: Int? = null, col: Int? = null) { - if (file == null) { - issueCommand("warning", message) - return - } - issueCommand("warning", message) { - this.file = file - line?.let { v -> this.line = v } - col?.let { v -> this.col = v } - } -} - -fun error(message: String, file: String? = null, line: Int? = null, col: Int? = null) { - if (file == null) { - issueCommand("error", message) - return - } - issueCommand("error", message) { - this.file = file - line?.let { v -> this.line = v } - col?.let { v -> this.col = v } - } -}