Search in sources :

Example 1 with StaleClassCleaner

use of org.gradle.language.base.internal.tasks.StaleClassCleaner 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)

Example 2 with StaleClassCleaner

use of org.gradle.language.base.internal.tasks.StaleClassCleaner in project gradle by gradle.

the class PlayCoffeeScriptCompile method doCompile.

@Override
public void doCompile() {
    StaleClassCleaner cleaner = new SimpleStaleClassCleaner(getOutputs());
    cleaner.setDestinationDir(getDestinationDir());
    cleaner.execute();
    super.doCompile();
}
Also used : StaleClassCleaner(org.gradle.language.base.internal.tasks.StaleClassCleaner) SimpleStaleClassCleaner(org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner) SimpleStaleClassCleaner(org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner)

Example 3 with StaleClassCleaner

use of org.gradle.language.base.internal.tasks.StaleClassCleaner in project gradle by gradle.

the class ProcessResources method copy.

@Override
protected void copy() {
    StaleClassCleaner cleaner = new SimpleStaleClassCleaner(getOutputs());
    cleaner.setDestinationDir(getDestinationDir());
    cleaner.execute();
    super.copy();
}
Also used : StaleClassCleaner(org.gradle.language.base.internal.tasks.StaleClassCleaner) SimpleStaleClassCleaner(org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner) SimpleStaleClassCleaner(org.gradle.language.base.internal.tasks.SimpleStaleClassCleaner)

Example 4 with StaleClassCleaner

use of org.gradle.language.base.internal.tasks.StaleClassCleaner in project gradle by gradle.

the class CleaningJavaCompilerSupport method execute.

@Override
public WorkResult execute(T spec) {
    StaleClassCleaner cleaner = createCleaner(spec);
    cleaner.setDestinationDir(spec.getDestinationDir());
    cleaner.setSource(spec.getSource());
    cleaner.execute();
    Compiler<? super T> compiler = getCompiler();
    return compiler.execute(spec);
}
Also used : StaleClassCleaner(org.gradle.language.base.internal.tasks.StaleClassCleaner)

Aggregations

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