use of org.gradle.plugins.javascript.envjs.http.simple.SimpleHttpFileServerFactory in project gradle by gradle.
the class BrowserEvaluate method doEvaluate.
@TaskAction
void doEvaluate() {
HttpFileServer fileServer = new SimpleHttpFileServerFactory().start(getContent(), 0);
try {
Writer resultWriter = new FileWriter(getResult());
getEvaluator().evaluate(fileServer.getResourceUrl(getResource()), resultWriter);
resultWriter.close();
} catch (IOException e) {
throw new UncheckedIOException(e);
} finally {
fileServer.stop();
}
setDidWork(true);
}
Aggregations