Package: org.codehaus.groovy.ant

## [Java] Class UberCompileTask

- org.codehaus.groovy.ant.UberCompileTask

-     public class UberCompileTask
      extends Task

  Compiles Java and Groovy source files. This works by invoking the GenerateStubsTask task, then the Javac task and then the GroovycTask. Each task can be configured by creating a nested element. Common configuration such as the source dir and classpath is picked up from this task's configuration.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Path` | `createClasspath()` Creates a nested `<classpath>` path element.
    `` | `public UberCompileTask.GenStubsAdapter` | `createGeneratestubs()` Lazily creates the nested stub-generation adapter.
    `` | `public UberCompileTask.GroovycAdapter` | `createGroovyc()` Lazily creates the nested Groovy compilation adapter.
    `` | `public UberCompileTask.JavacAdapter` | `createJavac()` Lazily creates the nested Java compilation adapter.
    `` | `public Path` | `createSrc()` Creates a nested `<src>` path element.
    `` | `public void` | `execute()` Runs stub generation, Java compilation, and Groovy compilation in sequence.
    `` | `public Path` | `getClasspath()` Returns the configured shared compilation classpath.
    `` | `public Path` | `getSrcdir()` Returns the configured source roots.
    `` | `public void` | `setClasspath(Path path)` Adds entries to the shared compilation classpath.
    `` | `public void` | `setClasspathRef(Reference r)` Adds a reference to a classpath defined elsewhere.
    `` | `public void` | `setDestdir(File dir)` Sets the destination directory for compiled output.
    `` | `public void` | `setSrcdir(Path dir)` Adds source roots to the task.
    `` | `protected void` | `validate()` Validates the task configuration before running the nested compilers.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Task` | `bindToOwner, clone, equals, execute, getClass, getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, getTaskType, hashCode, init, log, log, log, log, maybeConfigure, notify, notifyAll, perform, reconfigure, setDescription, setLocation, setOwningTarget, setProject, setRuntimeConfigurableWrapper, setTaskName, setTaskType, toString, wait, wait, wait`

- - ### Method Detail

    - #### public Path createClasspath()

      Creates a nested `<classpath>` path element.

      Returns:
        the path element to configure

    - #### public UberCompileTask.GenStubsAdapter createGeneratestubs()

      Lazily creates the nested stub-generation adapter.

      Returns:
        the adapter used to configure stub generation

    - #### public UberCompileTask.GroovycAdapter createGroovyc()

      Lazily creates the nested Groovy compilation adapter.

      Returns:
        the adapter used to configure Groovy compilation

    - #### public UberCompileTask.JavacAdapter createJavac()

      Lazily creates the nested Java compilation adapter.

      Returns:
        the adapter used to configure Java compilation

    - #### public Path createSrc()

      Creates a nested `<src>` path element.

      Returns:
        the path element to configure

    - #### public void execute()

      Runs stub generation, Java compilation, and Groovy compilation in sequence.

      throws:
        BuildException if configuration is invalid or any nested task fails

    - #### public Path getClasspath()

      Returns the configured shared compilation classpath.

      Returns:
        the classpath

    - #### public Path getSrcdir()

      Returns the configured source roots.

      Returns:
        the source path

    - #### public void setClasspath(Path path)

      Adds entries to the shared compilation classpath.

      Parameters:
        `path` - the classpath entries to append

    - #### public void setClasspathRef(Reference r)

      Adds a reference to a classpath defined elsewhere.

      Parameters:
        `r` - the classpath reference

    - #### public void setDestdir(File dir)

      Sets the destination directory for compiled output.

      Parameters:
        `dir` - the destination directory

    - #### public void setSrcdir(Path dir)

      Adds source roots to the task.

      Parameters:
        `dir` - the source path to append

    - #### protected void validate()

      Validates the task configuration before running the nested compilers.

      throws:
        BuildException if required attributes are missing or invalid