I have a gradle project in eclipse and all external jars are downloaded in the root directory of the project. I am wondering if there is a way to download all the jars by default in to a specific directory
I have added the following entries in my gradle.build file, but it doesn’t work:
task copyToLib(type: Copy) {
into "$buildDir/output/lib"
from configurations.runtime
}
build.dependsOn copyToLib
By performing “gradle refresh all” in eclipse, I still getting all my external libraries in the root folder of my project. Am I missing anything?
Are you using the STS Gradle plugin, or Buildship ?
Why do you really need your dependencies in the project folder ?
Best practice is that the .classpath file is generated (by buildship / the gradle eclipse plugin / sth else) and points to wherever the dependencies are downloaded (in the gradle cache)
I don’t need my dependencies in the project folder, but gradle download them automatically when I perform “gradle -> refresh all” (Have a look please on the attached screenshot)
I would prefer to have a good organized project, and not so many jars (screenshot), therefore I asked about uploading the files into a folder.
I will have to read about that feature that you wrote (generation of the classpath) because I didn’t know it. Please let me know if you have suggestions.