Skip to content

Commit

Permalink
Toggling via prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Krystian Panek committed Oct 2, 2020
1 parent c7c766a commit 82fc289
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/kotlin/com/cognifide/gradle/htl/tasks/HtlValidate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ open class HtlValidate : HtlTask() {
@Internal
val printIssues = project.objects.property(Boolean::class.java).apply {
convention(true)
project.findProject("htl.printIssues")?.toString()?.toBoolean()?.let { set(it) }
project.findProject("htl.validator.printIssues")?.toString()?.toBoolean()?.let { set(it) }
}

fun printIssues() {
Expand All @@ -26,7 +26,7 @@ open class HtlValidate : HtlTask() {
@Input
val failOnWarnings = project.objects.property(Boolean::class.java).apply {
convention(false)
project.findProject("htl.failOnWarnings")?.toString()?.toBoolean()?.let { set(it) }
project.findProject("htl.validator.failOnWarnings")?.toString()?.toBoolean()?.let { set(it) }
}

fun failOnWarnings() {
Expand Down Expand Up @@ -83,6 +83,7 @@ open class HtlValidate : HtlTask() {

init {
description = "Validates HTL templates"
enabled = project.findProperty("htl.validator.enabled")?.toString()?.toBoolean() ?: true
}

companion object {
Expand Down

0 comments on commit 82fc289

Please sign in to comment.