Created
August 18, 2016 19:39
-
-
Save ethankhall/4c62e880efab24bd6a522f068be0501d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configurations { | |
groovy | |
} | |
dependencies { | |
groovy localGroovy() | |
} | |
project.tasks.create("generateExample", JavaExec) { task -> | |
def inputFile = file("input.groovy") | |
def outputFile = file("output.txt") | |
task.inputs.file(inputFile) | |
task.outputs.file(outputFile) | |
task.main = "groovy.ui.GroovyMain" | |
task.args = [inputFile] | |
task.classpath = configurations.groovy | |
def output = new FileOutputStream(outputFile) | |
task.standardOutput = output | |
task.errorOutput = output | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "Hello World" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment