From 9bfa6139014dde630a50f60807985c5f5b153c6e Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Tue, 31 May 2016 14:20:21 -0700 Subject: [PATCH] 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. --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index b52d299ad94..5c6ec366930 100644 --- a/build.gradle +++ b/build.gradle @@ -303,9 +303,10 @@ allprojects { into '.settings' } // otherwise .settings is not nuked entirely - tasks.cleanEclipse { + task wipeEclipseSettings(type: Delete) { delete '.settings' } + tasks.cleanEclipse.dependsOn(wipeEclipseSettings) // otherwise the eclipse merging is *super confusing* tasks.eclipse.dependsOn(cleanEclipse, copyEclipseSettings) }