app.softwork.kotlin.actions.ActionYmlSource.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-plugin Show documentation
Show all versions of gradle-plugin Show documentation
Write GitHub Actions in Kotlin
The newest version!
package app.softwork.kotlin.actions
import org.gradle.api.file.*
import org.gradle.api.provider.*
abstract class ActionYmlSource : ValueSource {
interface Parameters : ValueSourceParameters {
val actionFile: RegularFileProperty
}
override fun obtain(): ActionYml {
val text = parameters.actionFile.asFile.get().readText()
return json.decodeFromString(text.replace(replaceActionExpressions, "\"\""))
}
}