@CompileStatic final class ViewCompileDestination extends java.lang.Object
The directory a view compile task compiles into.
A compiler leaves alone what it finds there - the page compiler a page whose class is newer than its source, both the class of a view that is gone - so a destination that kept what an earlier execution compiled would carry views of another environment, classpath or configuration, or views that no longer exist, into the archive and the build cache. It is emptied before each execution, and so holds exactly what that execution compiled, at the cost of compiling every view each time the task runs. It has therefore to be a directory of the task's own, within the build directory, and one the compiler's classpath does not hold: a build that points a task at the build directory itself, outside it, or at a directory of classes the views are compiled against is refused. A directory shared with the output of another task is emptied of that output too, which Gradle reports as overlapping outputs. A destination that is itself a symbolic link is not one Gradle keeps: it removes a link at a declared output path as a stale output before the task runs.
| Type Params | Return Type | Name and description |
|---|---|---|
|
static void |
empty(FileSystemOperations operations, java.io.File destination, java.io.File buildDirectory, java.util.Collection<java.io.File> classpath, java.lang.String task)Empties destination, with Gradle's deleter, which removes a symbolic link beneath it
rather than what the link points at, and leaves the directory there to compile into. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Empties destination, with Gradle's deleter, which removes a symbolic link beneath it
rather than what the link points at, and leaves the directory there to compile into.
operations - the build's file operationsdestination - the directorybuildDirectory - the build directory, which the destination has to be a directory withinclasspath - the compiler's classpath, which the destination may not hold or be held bytask - the path of the task, for the message