Skip to content

Instantly share code, notes, and snippets.

@danielkocot
Created April 13, 2018 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielkocot/20d773a866791c5730b3cc602212253c to your computer and use it in GitHub Desktop.
Save danielkocot/20d773a866791c5730b3cc602212253c to your computer and use it in GitHub Desktop.
Gradle task for creating jbakeignorefile
task createjbakeignorefile {
group = "documentation"
doLast {
def allFiles = fileTree("src/documentation/content/test-reports").filter { it.isFile()}.files.name
allFiles.remove("index.ad")
allFiles.remove("aggregated_report.json")
def ignorefileName = "src/documentation/content/test-reports/.jbakeignore"
def ignoreFile = new File(ignorefileName)
ignoreFile.write(allFiles.join("\n"))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment