# Is there a way to prevent gradle from reordering .classpath?

**URL:** <https://discuss.gradle.org/t/is-there-a-way-to-prevent-gradle-from-reordering-classpath/3070>\
**Category:** Old Forum Archive\
**Created:** [February 10, 2015, 10:33pm UTC](https://discuss.gradle.org/t/is-there-a-way-to-prevent-gradle-from-reordering-classpath/3070 "2015-02-10T22:33:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Branko](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@Branko](https://discuss.gradle.org/u/Branko)\
**Post date:** [February 10, 2015, 10:33pm UTC](https://discuss.gradle.org/t/is-there-a-way-to-prevent-gradle-from-reordering-classpath/3070/1 "2015-02-10T22:33:00Z")

</div>

Is there a way to tell gradle to not touch eclipse .classpath? Especially since there is nothing that needs to change. Here is a sample .classpath:

\<?xml version="1.0" encoding="UTF-8"?\> \<classpath\>

\<classpathentry kind="src" path="src"/\>

\<classpathentry kind="src" path="conf"/\>

\<classpathentry kind="src" path="docs"/\>

\<classpathentry kind="src" output="testclasses" path="test"/\>

\<classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE\_CONTAINER/?project=test1&amp;ivyXmlPath=ivy.xml&amp;confs=\*"/\>

\<classpathentry kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer"/\>

\<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE\_CONTAINER"/\>

\<classpathentry kind="output" path="classes"/\> \</classpath\>

After I run gradle-\>Refresh Dependencies in eclipse it turns into:

\<?xml version="1.0" encoding="UTF-8"?\> \<classpath\>

\<classpathentry kind="src" path="conf"/\>

\<classpathentry kind="src" path="docs"/\>

\<classpathentry kind="src" path="src"/\>

\<classpathentry kind="src" output="testclasses" path="test"/\>

\<classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE\_CONTAINER/?project=test1&amp;ivyXmlPath=ivy.xml&amp;confs=\*"/\>

\<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE\_CONTAINER"/\>

\<classpathentry kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer"/\>

\<classpathentry kind="output" path="classes"/\> \</classpath\>

Notice that the only difference is the order of src directories: original: src, conf, docs, test after: conf, docs, src, test

Since I like the original ordering, I always end up reverting the changes.

Is there a way to avoid having to do that?

Many thanks, Branko
