Order of classpath entries from Gradle script
Hi
I have a project with a lot of dependencies and I'm currently trying to adapt our Gradle build script so our devs can use both Eclipse or IDEA.The app will load all jars from folder 'bespoke' and then from folder 'lib' in almost alphabetical order, meaning CAPITAL letters have precedence over lower case letters.
To achieve that I use this in the gradle dependencies block: compile fileTree(dir: "$lib", include: '*.jar')
When I print this to the console the file tree has the correct order of jars. Using that Gradle script in Eclipse I also get the expected order, alphabetical with upper case before lower case. IDEA (13.0.2) seems to ignore the upper/lower case part completely and I have to manually fix that in the project structure.
Is this a bug or a settting? Any idea how to fix that behavior?
Thanks
Martin
请先登录再写评论。
Hi Martin,
There is a related issue with the order of dependencies at the Gradle tracker, you can watch and vote corresponding issue at http://issues.gradle.org/browse/GRADLE-2294
But, if you need to have the same order both for Eclipse (which also uses Gradle Tooling API, afaik) and IDEA:
1. Please, try 13.0.2 or above
or
2. You can also try -Dgradle.disable.enhanced.tooling.api=true in .vmoptions file (http://intellij-support.jetbrains.com/entries/23395793).
Message was edited by: Vladislav Soroka
Hi Vladislav,
I tried both things (I actuall already was using the.2 version) and nothing changed.
Examplary classpath order in
Application logs:
C.jar
a.jar
b.jar
gradle command line (println)
C.jar
a.jar
b.jar
Eclipse:
C.jar
a.jar
b.jar
Idea:
a.jar
b.jar
Is there any way to tell IDEA it should not ignore the case?