Search in sources :

Example 1 with DefaultJavaScriptCompileSpec

use of org.gradle.play.internal.javascript.DefaultJavaScriptCompileSpec in project gradle by gradle.

the class JavaScriptMinify method compileJavaScriptSources.

@TaskAction
void compileJavaScriptSources() {
    StaleClassCleaner cleaner = new SimpleStaleClassCleaner(getOutputs());
    cleaner.setDestinationDir(getDestinationDir());
    cleaner.execute();
    MinifyFileVisitor visitor = new MinifyFileVisitor();
    getSource().visit(visitor);
    JavaScriptCompileSpec spec = new DefaultJavaScriptCompileSpec(visitor.relativeFiles, getDestinationDir(), getForkOptions());
    getCompiler().execute(spec);
}
Also used : SimpleStaleClassCleaner(org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner) StaleClassCleaner(org.gradle.language.base.internal.tasks.StaleClassCleaner) SimpleStaleClassCleaner(org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner) DefaultJavaScriptCompileSpec(org.gradle.play.internal.javascript.DefaultJavaScriptCompileSpec) JavaScriptCompileSpec(org.gradle.play.internal.javascript.JavaScriptCompileSpec) DefaultJavaScriptCompileSpec(org.gradle.play.internal.javascript.DefaultJavaScriptCompileSpec) TaskAction(org.gradle.api.tasks.TaskAction)

Aggregations

TaskAction (org.gradle.api.tasks.TaskAction)1 SimpleStaleClassCleaner (org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner)1 StaleClassCleaner (org.gradle.language.base.internal.tasks.StaleClassCleaner)1 DefaultJavaScriptCompileSpec (org.gradle.play.internal.javascript.DefaultJavaScriptCompileSpec)1 JavaScriptCompileSpec (org.gradle.play.internal.javascript.JavaScriptCompileSpec)1