org.spiffyui.build
Class ClosureTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.spiffyui.build.ClosureTask
All Implemented Interfaces:
java.lang.Cloneable

public class ClosureTask
extends org.apache.tools.ant.Task

This is a custom task for calling the Google Closure compiler.


Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
ClosureTask()
           
 
Method Summary
 void add(org.apache.tools.ant.types.ResourceCollection c)
          Add an arbitrary ResourceCollection.
 void addFilelist(org.apache.tools.ant.types.FileList list)
          List of files to compile.
 void addFileset(org.apache.tools.ant.types.FileSet set)
          Adds the file set of JavaScript files to compile
 void execute()
          Executes this task to run the compiler.
 void reset()
          Reset state to default.
 void setClosureJar(java.io.File jarFile)
          Set the path to the closure compiler JAR file normally named compiler.jar.
 void setCompilationLevel(java.lang.String level)
          Sets the compilation level
 void setJSfile(java.io.File jsFile)
          Sepcify the name of the output file.
 void setSummaryLevel(java.lang.String level)
          Controls how detailed the compilation summary is.
 void setWarningLevel(java.lang.String level)
          Specifies the warning level to use.
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClosureTask

public ClosureTask()
Method Detail

addFileset

public void addFileset(org.apache.tools.ant.types.FileSet set)
Adds the file set of JavaScript files to compile

Parameters:
set - the set of files

addFilelist

public void addFilelist(org.apache.tools.ant.types.FileList list)
List of files to compile.

Parameters:
list - the list of files

setJSfile

public void setJSfile(java.io.File jsFile)
Sepcify the name of the output file. This is required

Parameters:
jsFile - the output file name

setClosureJar

public void setClosureJar(java.io.File jarFile)
Set the path to the closure compiler JAR file normally named compiler.jar.

Parameters:
jarFile - the closure compiler JAR file

setSummaryLevel

public void setSummaryLevel(java.lang.String level)
Controls how detailed the compilation summary is. Values: 0 (never print summary), 1 (print summary only if there are errors or warnings), 2 (print summary if type checking is on, see --check_types), 3 (always print summary). The default level is 1.; default: 1

Parameters:
level - the summary level

setWarningLevel

public void setWarningLevel(java.lang.String level)
Specifies the warning level to use. Options: QUIET, DEFAULT, VERBOSE; default: DEFAULT

Parameters:
level - the warning level to use

setCompilationLevel

public void setCompilationLevel(java.lang.String level)
Sets the compilation level

Parameters:
level - the compilation level

add

public void add(org.apache.tools.ant.types.ResourceCollection c)
Add an arbitrary ResourceCollection.

Parameters:
c - the ResourceCollection to add.
Since:
Ant 1.7

reset

public void reset()
Reset state to default.


execute

public void execute()
             throws org.apache.tools.ant.BuildException
Executes this task to run the compiler.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - if there isn't enough information to run the GWT compiler