Make the tmp file created for jjs scripts be deleted when gradle exits

This commit is contained in:
Ryan Ernst 2015-11-19 10:33:31 -08:00
parent c93f074183
commit d1a27aed16
1 changed files with 2 additions and 1 deletions

View File

@ -151,7 +151,8 @@ class BuildPlugin implements Plugin<Project> {
/** Runs the given javascript using jjs from the jdk, and returns the output */
private static String runJavascript(Project project, String javaHome, String script) {
File tmpScript = File.createTempFile('es-gradle-tmp', '.js');
File tmpScript = File.createTempFile('es-gradle-tmp', '.js')
tmpScript.deleteOnExit()
tmpScript.setText(script, 'UTF-8')
ByteArrayOutputStream output = new ByteArrayOutputStream()
project.exec {