use of org.gradle.api.tasks.TaskAction 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);
}
use of org.gradle.api.tasks.TaskAction in project gradle by gradle.
the class RoutesCompile method compile.
@TaskAction
void compile() {
RoutesCompileSpec spec = new DefaultRoutesCompileSpec(getSource().getFiles(), getOutputDirectory(), getForkOptions(), isJavaProject(), isNamespaceReverseRouter(), isGenerateReverseRoutes(), getInjectedRoutesGenerator(), getAdditionalImports());
new CleaningPlayToolCompiler<RoutesCompileSpec>(getCompiler(), getOutputs()).execute(spec);
}
use of org.gradle.api.tasks.TaskAction in project gradle by gradle.
the class GeneratePluginDescriptors method generatePluginDescriptors.
@TaskAction
public void generatePluginDescriptors() {
clearOutputDirectory();
for (PluginDeclaration declaration : getDeclarations()) {
File descriptorFile = new File(getOutputDirectory(), declaration.getId() + ".properties");
Properties properties = new Properties();
properties.setProperty("implementation-class", declaration.getImplementationClass());
writePropertiesTo(properties, descriptorFile);
}
}
use of org.gradle.api.tasks.TaskAction in project gradle by gradle.
the class GenerateBuildDashboard method run.
@TaskAction
void run() {
if (getReports().getHtml().isEnabled()) {
BuildDashboardGenerator generator = new BuildDashboardGenerator();
generator.render(getEnabledInputReports(), reports.getHtml().getEntryPoint());
} else {
setDidWork(false);
}
}
use of org.gradle.api.tasks.TaskAction in project gradle by gradle.
the class AbstractScalaCompile method compile.
@Override
@TaskAction
protected void compile() {
ScalaJavaJointCompileSpec spec = createSpec();
configureIncrementalCompilation(spec);
getCompiler(spec).execute(spec);
}
Aggregations