Search in sources :

Example 1 with RhinoCoffeeScriptCompiler

use of org.gradle.plugins.javascript.coffeescript.compile.internal.rhino.RhinoCoffeeScriptCompiler in project gradle by gradle.

the class CoffeeScriptCompile method doCompile.

@TaskAction
public void doCompile() {
    RhinoWorkerHandleFactory handleFactory = new DefaultRhinoWorkerHandleFactory(getWorkerProcessBuilderFactory());
    CoffeeScriptCompileSpec spec = new DefaultCoffeeScriptCompileSpec();
    spec.setCoffeeScriptJs(getCoffeeScriptJs().getSingleFile());
    spec.setDestinationDir(getDestinationDir());
    spec.setSource(getSource());
    spec.setOptions(getOptions());
    LogLevel logLevel = getProject().getGradle().getStartParameter().getLogLevel();
    CoffeeScriptCompiler compiler = new RhinoCoffeeScriptCompiler(handleFactory, getRhinoClasspath(), logLevel, getProject().getProjectDir());
    setDidWork(compiler.compile(spec).getDidWork());
}
Also used : RhinoCoffeeScriptCompiler(org.gradle.plugins.javascript.coffeescript.compile.internal.rhino.RhinoCoffeeScriptCompiler) DefaultRhinoWorkerHandleFactory(org.gradle.plugins.javascript.rhino.worker.internal.DefaultRhinoWorkerHandleFactory) DefaultRhinoWorkerHandleFactory(org.gradle.plugins.javascript.rhino.worker.internal.DefaultRhinoWorkerHandleFactory) RhinoWorkerHandleFactory(org.gradle.plugins.javascript.rhino.worker.RhinoWorkerHandleFactory) DefaultCoffeeScriptCompileSpec(org.gradle.plugins.javascript.coffeescript.compile.internal.DefaultCoffeeScriptCompileSpec) RhinoCoffeeScriptCompiler(org.gradle.plugins.javascript.coffeescript.compile.internal.rhino.RhinoCoffeeScriptCompiler) DefaultCoffeeScriptCompileSpec(org.gradle.plugins.javascript.coffeescript.compile.internal.DefaultCoffeeScriptCompileSpec) LogLevel(org.gradle.api.logging.LogLevel) TaskAction(org.gradle.api.tasks.TaskAction)

Aggregations

LogLevel (org.gradle.api.logging.LogLevel)1 TaskAction (org.gradle.api.tasks.TaskAction)1 DefaultCoffeeScriptCompileSpec (org.gradle.plugins.javascript.coffeescript.compile.internal.DefaultCoffeeScriptCompileSpec)1 RhinoCoffeeScriptCompiler (org.gradle.plugins.javascript.coffeescript.compile.internal.rhino.RhinoCoffeeScriptCompiler)1 RhinoWorkerHandleFactory (org.gradle.plugins.javascript.rhino.worker.RhinoWorkerHandleFactory)1 DefaultRhinoWorkerHandleFactory (org.gradle.plugins.javascript.rhino.worker.internal.DefaultRhinoWorkerHandleFactory)1