Gradle equivalent to Apache Sling HTL Maven Plugin.
Tested with Gradle 6.0.0 and above.
Plugin is released in Gradle Plugin Portal. See notes from there.
Simply run the task gradlew htlValidate
.
Sample configuration (shown values are plugin defaults):
htl {
sourceDir("src/main/content/jcr_root")
sourceFilter {
include("**/*.html", "**/*.htl")
exclude("**/some-subdir/*")
}
}
tasks {
htlValidate {
/*
failOnWarnings() // or via property: htl.validator.failOnWarnings=true
printIssues() // or via property: htl.validator.printIssues=true
enabled = false // or via property: htl.validator.enabled=false
*/
}
}
Gradle HTL Plugin is licensed under the Apache License, Version 2.0 (the "License")