Skip to content

Instantly share code, notes, and snippets.

@manuc66
Created April 10, 2017 09:08
Show Gist options
  • Save manuc66/8294a7d2a125cd8af2415df7ff192b99 to your computer and use it in GitHub Desktop.
Save manuc66/8294a7d2a125cd8af2415df7ff192b99 to your computer and use it in GitHub Desktop.
File outputFile = project.file(filename)
outputFile.newOutputStream().with { OutputStream os ->
new PrintStream(new FileOutputStream(outputFile)).with { PrintStream ps ->
def result = buildBaseObject()
reporter.write(ps, result)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment