Buildship should only call cleanEclipseWtp
, nothing else.
But now itās not deleting .settings folder any more. Interesting not?
Well, does it delete .settings when you re-add your custom task?
Yes:
- adding it back
- removing the projects from eclipse
- running from command line: gradlew.bat cleanEclipse cleanEclipseCustom
- try to import the project into Eclipse using Existing Gradle Project
- Result:
Well of course itās gone if you explicitly call your clean task. Why do you do that?
I donāt know how this can be misunderstood.
If I clean a project completely and start a fresh export I expect, that it creates alle Eclipse Workspace files. Is this expectation false?
So After Step 4 in my previous posting it should have new .settings folder but it has not.
Next Test:
I renamed the task to something differentā¦ .settings folder still get removed during import.
allprojects {
apply plugin: 'eclipse'
group = 'de.pentos'
version = '1.0.2'
task cEC {
delete '.settings'
delete 'bin'
delete 'build'
}
}
Then I removed it completely
allprojects {
apply plugin: 'eclipse'
group = 'de.pentos'
version = '1.0.2'
}
Now the import works fine
Your snippet is calling Project.delete
at configuration time. You forgot to specify the type of the task:
task customClean(type:Delete) {
delete '.settings'
delete 'bin'
delete 'build'
}
Ups, my mistake.
So there is no error with deleting .settings, but the project still has the wrong facet with BuildShip 2