Build: Rework eclipse settings copy so it does not get automatically cleaned

Gradle has "rules" for certain task names, and clean is one of these.
When you run clean, it searches for any tasks named cleanX, and tries to
reverse engineer the X task. For eclipse, this means it finds
cleanEclipse, and internally runs it (but this does not show up as a
dependency of clean in tasks list!!). Since we added .settings as an
additional file to delete with cleanEclipse, this gets deleted when
running just "clean". It doesn't delete the other files because those
have their own clean methods, and dependencies are not followed in this
insanity. This change simply makes a separate task for cleaning eclipse
settings.
This commit is contained in:
Ryan Ernst 2016-05-31 14:20:21 -07:00
parent 454de6a8f2
commit 9bfa613901
1 changed files with 2 additions and 1 deletions

View File

@ -303,9 +303,10 @@ allprojects {
into '.settings' into '.settings'
} }
// otherwise .settings is not nuked entirely // otherwise .settings is not nuked entirely
tasks.cleanEclipse { task wipeEclipseSettings(type: Delete) {
delete '.settings' delete '.settings'
} }
tasks.cleanEclipse.dependsOn(wipeEclipseSettings)
// otherwise the eclipse merging is *super confusing* // otherwise the eclipse merging is *super confusing*
tasks.eclipse.dependsOn(cleanEclipse, copyEclipseSettings) tasks.eclipse.dependsOn(cleanEclipse, copyEclipseSettings)
} }