Allow 'gradle eclipse' without 'cleanEclipse'
Allow eclipse projects to be regenerated without first requiring the 'gradle cleanEclipse' task to be executed.
This commit is contained in:
parent
8694a0aac0
commit
f57c24cd8c
|
@ -28,6 +28,13 @@ eclipse.classpath.file.whenMerged { classpath ->
|
||||||
|
|
||||||
// Use separate main/test outputs (prevents WTP from packaging test classes)
|
// Use separate main/test outputs (prevents WTP from packaging test classes)
|
||||||
eclipse.classpath.defaultOutputDir = file(project.name+"/eclipse/bin")
|
eclipse.classpath.defaultOutputDir = file(project.name+"/eclipse/bin")
|
||||||
|
eclipse.classpath.file.beforeMerged { classpath ->
|
||||||
|
classpath.entries.findAll{ it instanceof SourceFolder }.each {
|
||||||
|
if(it.output.startsWith("build/eclipse")) {
|
||||||
|
it.output = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
eclipse.classpath.file.whenMerged { classpath ->
|
eclipse.classpath.file.whenMerged { classpath ->
|
||||||
classpath.entries.findAll{ it instanceof SourceFolder }.each {
|
classpath.entries.findAll{ it instanceof SourceFolder }.each {
|
||||||
it.output = "build/eclipse/" + it.path.split("/")[1]
|
it.output = "build/eclipse/" + it.path.split("/")[1]
|
||||||
|
|
Loading…
Reference in New Issue