On 20/03/10 3:17 PM, phil swenson wrote:
I had to override the classes directory to make gradle work with our
existing system. But when I did this, "gradle clean" doesn't delete
the classes dir. Any suggestions?
here is the code:
sourceSets {
main {
java {
srcDir '../src/java/core'
}
}
test {
java {
srcDir '../src/java/test'
}
}
}
sourceSets.main.classesDir = new File("../build/out/classes")
sourceSets.test.classesDir = new File("../build/out/classes")
The clean task deletes the $projectDir/build directory. In your case,
the classes aren't under this directory and aren't getting deleted.
The task could potentially also delete the output of some of the tasks
of the project, such as the compile tasks, regardless of whether they
are under $projectDir/build directory or not. Perhaps you could add a
JIRA issue for this problem?
In the meantime, you can do something like
clean.doLast {
sourceSets.each {
ant.delete(dir: it.classesDir)
}
}
or, in 0.9
clean {
from sourceSets*.classesDir
}
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email