|
| 1 | +// This file was generated using action-binding-generator. Don't change it by hand, otherwise your |
| 2 | +// changes will be overwritten with the next binding code regeneration. |
| 3 | +// See https://github.com/typesafegithub/github-workflows-kt for more info. |
| 4 | +@file:Suppress( |
| 5 | + "DataClassPrivateConstructor", |
| 6 | + "UNUSED_PARAMETER", |
| 7 | +) |
| 8 | + |
| 9 | +package io.github.typesafegithub.workflows.actions.gradle |
| 10 | + |
| 11 | +import io.github.typesafegithub.workflows.domain.actions.Action |
| 12 | +import io.github.typesafegithub.workflows.domain.actions.RegularAction |
| 13 | +import java.util.LinkedHashMap |
| 14 | +import kotlin.Boolean |
| 15 | +import kotlin.Int |
| 16 | +import kotlin.String |
| 17 | +import kotlin.Suppress |
| 18 | +import kotlin.Unit |
| 19 | +import kotlin.collections.List |
| 20 | +import kotlin.collections.Map |
| 21 | +import kotlin.collections.toList |
| 22 | +import kotlin.collections.toTypedArray |
| 23 | + |
| 24 | +/** |
| 25 | + * Action: Gradle Wrapper Validation |
| 26 | + * |
| 27 | + * Validates Gradle Wrapper JAR Files |
| 28 | + * |
| 29 | + * [Action on GitHub](https://github.com/gradle/wrapper-validation-action) |
| 30 | + * |
| 31 | + * @param minWrapperCount Minimum number expected gradle-wrapper.jar files found in the repository. |
| 32 | + * Non-negative number. Higher number is useful in monorepos where each project might have their own |
| 33 | + * wrapper. |
| 34 | + * @param allowSnapshots Allow Gradle snapshot versions during checksum verification. Boolean, true |
| 35 | + * or false. |
| 36 | + * @param allowChecksums Accept arbitrary user-defined checksums as valid. Comma separated list of |
| 37 | + * SHA256 checksums (lowercase hex). |
| 38 | + * @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by |
| 39 | + * the binding |
| 40 | + * @param _customVersion Allows overriding action's version, for example to use a specific minor |
| 41 | + * version, or a newer version that the binding doesn't yet know about |
| 42 | + */ |
| 43 | +public data class WrapperValidationActionV3 private constructor( |
| 44 | + /** |
| 45 | + * Minimum number expected gradle-wrapper.jar files found in the repository. Non-negative |
| 46 | + * number. Higher number is useful in monorepos where each project might have their own wrapper. |
| 47 | + */ |
| 48 | + public val minWrapperCount: Int? = null, |
| 49 | + /** |
| 50 | + * Allow Gradle snapshot versions during checksum verification. Boolean, true or false. |
| 51 | + */ |
| 52 | + public val allowSnapshots: Boolean? = null, |
| 53 | + /** |
| 54 | + * Accept arbitrary user-defined checksums as valid. Comma separated list of SHA256 checksums |
| 55 | + * (lowercase hex). |
| 56 | + */ |
| 57 | + public val allowChecksums: List<String>? = null, |
| 58 | + /** |
| 59 | + * Type-unsafe map where you can put any inputs that are not yet supported by the binding |
| 60 | + */ |
| 61 | + public val _customInputs: Map<String, String> = mapOf(), |
| 62 | + /** |
| 63 | + * Allows overriding action's version, for example to use a specific minor version, or a newer |
| 64 | + * version that the binding doesn't yet know about |
| 65 | + */ |
| 66 | + public val _customVersion: String? = null, |
| 67 | +) : RegularAction<WrapperValidationActionV3.Outputs>("gradle", "wrapper-validation-action", |
| 68 | + _customVersion ?: "v3") { |
| 69 | + public constructor( |
| 70 | + vararg pleaseUseNamedArguments: Unit, |
| 71 | + minWrapperCount: Int? = null, |
| 72 | + allowSnapshots: Boolean? = null, |
| 73 | + allowChecksums: List<String>? = null, |
| 74 | + _customInputs: Map<String, String> = mapOf(), |
| 75 | + _customVersion: String? = null, |
| 76 | + ) : this(minWrapperCount=minWrapperCount, allowSnapshots=allowSnapshots, |
| 77 | + allowChecksums=allowChecksums, _customInputs=_customInputs, |
| 78 | + _customVersion=_customVersion) |
| 79 | + |
| 80 | + @Suppress("SpreadOperator") |
| 81 | + override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( |
| 82 | + *listOfNotNull( |
| 83 | + minWrapperCount?.let { "min-wrapper-count" to it.toString() }, |
| 84 | + allowSnapshots?.let { "allow-snapshots" to it.toString() }, |
| 85 | + allowChecksums?.let { "allow-checksums" to it.joinToString(",") }, |
| 86 | + *_customInputs.toList().toTypedArray(), |
| 87 | + ).toTypedArray() |
| 88 | + ) |
| 89 | + |
| 90 | + override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId) |
| 91 | + |
| 92 | + public class Outputs( |
| 93 | + stepId: String, |
| 94 | + ) : Action.Outputs(stepId) { |
| 95 | + /** |
| 96 | + * The path of the Gradle Wrapper(s) JAR that failed validation. Path is a |
| 97 | + * platform-dependent relative path to git repository root. Multiple paths are separated by a | |
| 98 | + * character. |
| 99 | + */ |
| 100 | + public val failedWrapper: String = "steps.$stepId.outputs.failed-wrapper" |
| 101 | + } |
| 102 | +} |
0 commit comments