I am trying to solve the problem described in GRADLE-2293 , where the generated files are always updated, because the timestamp is written to the Eclipse files located in the .settings directory using the Gradle plugin that generates the Eclipse project files.
Files contain a header similar to this which I would like to delete
# #Fri Mar 27 10:26:55 CET 2015
I am currently using the Exec task to use an external sed application to cut lines starting with '#':
task adjustEclipseSettingsFile(type: Exec) { executable 'sed' args '-i','-e','s/^#.*//g','.settings/org.eclipse.jdt.core.prefs' } eclipseJdt.finalizedBy adjustEclipseSettingsFile
however, this adds an operating system binary dependency that I would like to avoid.
How can I do this simple deletion of lines starting with "#" in the Gradle task without calling external tools?
source share